Re: Getting an app's identifier
Re: Getting an app's identifier
- Subject: Re: Getting an app's identifier
- From: John Stewart <email@hidden>
- Date: Fri, 30 May 2003 04:31:10 -0400
On Thursday, May 29, 2003, at 09:26 PM, Steve Roy wrote:
Hi,
Is there a way with AppleScript to get the identifier used by an
application?
For example, the identifier for Preview is com.apple.Preview. I'm
looking at the
Finder dictionary and can't see a propery that gives that. Any ideas
anyone?
Steve
--
Steve Roy <email@hidden>
Personal homepage: <http://homepage.mac.com/sroy>
Projects homepage: <http://www.roydesign.net>
_______________________________________________
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.
This will only work on "packaged" applications Such as the Address
Book. This needs error checking added too.
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")
John
_______________________________________________
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.