Re: Can't tell an application to open
Re: Can't tell an application to open
- Subject: Re: Can't tell an application to open
- From: Andreas Kiel <email@hidden>
- Date: Tue, 08 Mar 2011 15:13:47 +0100
I had a similar problem with PhotoShop which drove me mad.
Eventually I used the code below.
-- do once
tell application "Finder"
set photoShopPath to POSIX path of (application file id "8BIM" as
Unicode text) as string
-- "8BIM" has to be replaced in your case with the code of TextWrangler
-- the id helps when an app is renamed or a newer version with
different name is installed, for me Adobe PhotoShop CS3, Adobe
PhotoShop CS4, Adobe PhotoShop CS5
end tell
--
do shell script "open -a " & quoted form of photoShopPath & space &
quoted form of filePath -- file path is a posix path
May that helps
Andreas
On 21.02.2011, at 03:23, Shane Stanley wrote:
On 21/2/11 12:47 PM, "Dave" <email@hidden> wrote:
set theFile to POSIX file DebugLogPath
That's the problem line. You can't use POSIX file (or alias or
file) as a
specifier like that in AppleScriptObjC -- it just returns a
reference to the
script object. Change it to:
set theFile to DebugLogPath as POSIX file
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/
apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (applescriptobjc-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40spherico.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden