• 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: OS 9 - Package of running application file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS 9 - Package of running application file


  • Subject: Re: OS 9 - Package of running application file
  • From: Paul Skinner <email@hidden>
  • Date: Wed, 22 Jan 2003 07:44:40 -0500

Try this...

tell application "Finder"
set p to properties of file ((application file of (processes whose frontmost is true)) as string)
return {kind of p, container of p}
end tell

--
Paul Skinner

On Wednesday, January 22, 2003, at 06:38 AM, Brennan wrote:

Hi folks,

Apologies if this has been up before. I'm making a script which will do something
with the application file of the frontmost application in the Finder.

All works well UNLESS the app is inside a package, where the Finder has difficulty
resolving file references properly.

I decided to iterate up from the inner object, but I can't easily get the
container of objects inside packages because the Finder thinks they don't really
exist. Sometimes.

tell application "Finder"

set p to (file of (processes whose frontmost is true))

kind of p -- this causes a 'can't get' error.
container of p -- this causes a 'can't get' error.
p as string -- this causes a 'can't make into string' error.
p as alias -- this causes a 'can't make into alias' error.

end tell
_______________________________________________
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.

  • Follow-Ups:
    • Re: OS 9 - Package of running application file
      • From: Brennan <email@hidden>
References: 
 >OS 9 - Package of running application file (From: Brennan <email@hidden>)

  • Prev by Date: Re: Re: comparing and updating lists
  • Next by Date: Re: SE2b GUI comments->Abbreviations!
  • Previous by thread: OS 9 - Package of running application file
  • Next by thread: Re: OS 9 - Package of running application file
  • Index(es):
    • Date
    • Thread