Currently Being ModeratedJul 21, 2011 11:19 AM (in response to Steve Dorsey)
try this change to line 4:
set newAppPath to POSIX path of alias appPath
Currently Being ModeratedJul 21, 2011 12:30 PM (in response to twtwtw)
Nope, that does not change anything. It still does not launch.
Currently Being ModeratedJul 21, 2011 2:14 PM (in response to Steve Dorsey)
hmmm… well, a bit more playing with it and it looks like the problem has something to do with the file/folder name. for instance, if I change the folder name to foo and use an app named foobar.app it works as anticipated. see if you get a similar result.
also, you ought to use 'quoted form of' with your file path to deal with any spaces, so that you get a properly quoted unix path:
set newAppPath to quoted form of (POSIX path of appPath)
Currently Being ModeratedJul 21, 2011 3:38 PM (in response to twtwtw)
The 'quoted form of' text solved the issue. Here's the script in its working condition:
-- Path to the runtime in the App
set appPath to (((path to me) as text) & "Contents:Resources:PSD:PSD.app")
-- Convert path to a POSIX path
set newAppPath to quoted form of POSIX path of appPath
-- executing the script file
set command to "open " & newAppPath
do shell script command
Thanks for all the help!