How do I make an AppleScript use a Folder in the Contents of a Bundle for an alias on the Desktop? I'm trying to write an AppleScript to make a temporary alias on the desktop from a folder that resides in the Bundle's Contents:Resources folder and then execute a terminal command that has an argument from a file that also resides in the Bundle's Contents:Resources folder and then remove the temporary alias from the desktop upon finish or exit.

How do I fix the following code to accomplish this?

set myRes to (path to me as text) &amp; "Contents:Resources:"

tell application "Finder"
     make new alias to folder myRes &amp; "Pass-Through Drive" at desktop
end tell

tell application "Terminal"
     activate
     do script myRes &amp; "BasilliskII --config basilisk_ii_prefs"
end tell

tell application "Finder"
     delete file "Pass-Through Drive" of desktop
end tell


This is the error I get:

error "Can’t make «class cfol» \"Resources\" of «class cfol» \"Contents\" of «class appf» 
  \"Mac OS 8.1.app\" of «class cfol» \"Desktop\" of «class cfol» \"ryan\" of «class cfol»
  \"Users\" of «class sdsk» of application \"Finder\" into type list, record or text."
  number -1700 from «class cfol» "Resources" of «class cfol» "Contents" of «class appf» 
  "Mac OS 8.1.app" of «class cfol» "Desktop" of «class cfol» "ryan" of «class cfol» "Users"
  of «class sdsk» to list, record or text


I think I've corrected it down to...

set myRes to (path to me as text) &amp; "Contents:Resources:"

tell application "Finder"
     make new alias to folder (myRes &amp; "Pass-Through Drive") at desktop
end tell

tell application "Terminal"
     activate
     do script myRes &amp; "BasilliskII --config " &amp; myRes &amp; "basilisk_ii_prefs"
end tell

tell application "Finder"
    delete file "Pass-Through Drive" of desktop
end tell


but still having trouble with the middle lines and the proper syntax of what I'm trying to accomplish.
You don't need to tell Terminal to run the script (unless you just want to lay eyes on it). But also you'll want to use a posix path escaped to prevent errors.

You could do it like ...

set myRes to alias (path to me as text) &amp; "Contents:Resources:"

tell application "Finder"
     make new alias to folder (myRes &amp; "Pass-Through Drive") at desktop
end tell

set posixRes to (POSIX path of myRes)

do shell script quoted form of posixRes &amp; "BasilliskII --config " &amp; quoted form of posixRes &amp; "basilisk_ii_prefs"

tell application "Finder"
    delete file "Pass-Through Drive" of desktop
end tell