Subject: Paths that work fine from AS don't work when launched from
the command line
To: Applescript Users <email@hidden>
Message-ID: <email@hidden">email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I have a simple AppleScript that sets a variable to the name of an app I
want to launch. If the app is not found, it gives an error.
When I run this script from the Finder or in Script Editor it works fine.
However, when I execute it from a shell script using osascript, the
error shows up telling me it can't find the app I want to launch.
Is there some environment variable present in the OSA system that I need
to set in my script in order for it to find the app?
Here is my script:
set codeWariorIDE to "CodeWarrior IDE"
try
set codeWariorIDEFullPath to path to application codeWariorIDE
on error
error "Can't find the Codewarrior application! Please make sure
CodeWarrior Pro 8 is installed." number 1
end try
Thanks,
Mike