Re: Getting an app's identifier
Re: Getting an app's identifier
- Subject: Re: Getting an app's identifier
- From: Rob Jorgensen <email@hidden>
- Date: Fri, 30 May 2003 10:48:03 -0400
At 9:57 AM -0400 5/30/03, Paul Skinner wrote:
And this works on your box?
With what OSAXen coercions active?
Choose app returns an application name not a path. And the rest of
the code blows up with choose file.
Hmmm looks good though : )
On Friday, May 30, 2003, at 04:31 AM, John Stewart wrote:
set a to choose application
set bID to (do shell script "defaults read " & quoted form of POSIX
path of a & "/Contents/Info CFBundleIdentifier")
return bID
There is a second form of this which returns the plist info, I'll
leave it to you to figure out how to parse it.
set a to choose application
set bID to (do shell script "grep -A1 CFBundleIdentifier " & quoted
form of POSIX path of a & "/Contents/Info.plist")
Just an FYI to anyone messing with the scripts submitted on this thread...
I later ran my script on the FileMaker Pro 6 app and discovered that
the target plist is named Info-macos.plist instead of the more
generally used info.plist. Of course, this causes the script to fail.
I suspect that the name of the file, and the location, is at the
discretion of the app's developer. As always, error checking should
be applied in cases where you aren't sure of the file's existence,
name and/or location. :-)
-- Rob
_______________________________________________
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.