• 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: Finder - application file id
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder - application file id


  • Subject: Re: Finder - application file id
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 11 May 2004 16:09:51 -0700

On May 10, 2004, at 3:46 PM, Jon Otaegi wrote:

I need a script which locates an application given its creator type. I
tried with the following script:

tell application "Finder"
get name of application file id "sfri"
open application file result
end tell

getting the following error -> Finder got an error: Can't get file id
"sfri".

I'm working with Mac OS X version 10.3.3

That seems rather odd. That is, I'd expect this to fail, but not with that error, unless you've thrown away your copy of Safari. When I try that script here (also on 10.3.3), it fails on the second line, saying 'Finder got an error: Can't get application file "Safari.app".' The Finder doesn't know how to locate application files solely by their name. (It arguably should, but that's a separate issue.) However, either of the following works:

tell application "Finder"
get application file id "sfri"
open the result

-- or...
open application file id "sfri"
end

The error you quote suggests that there's no application with the signature "sfri", which should be impossible unless Safari isn't there.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Finder - application file id (From: Jon Otaegi <email@hidden>)

  • Prev by Date: Re: controlling remote application question
  • Next by Date: Re: Test, critique and ridicule this script!
  • Previous by thread: Re: Finder - application file id
  • Next by thread: Easy way to get a app version number?
  • Index(es):
    • Date
    • Thread