• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't tell an application to open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Can't tell an application to open
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Passing a variable to another class
  • Next by Date: Re: Can't tell an application to open
  • Previous by thread: Re: Passing a variable to another class
  • Next by thread: Re: Can't tell an application to open
  • Index(es):
    • Date
    • Thread