• 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: Getting an app's identifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Getting an app's identifier
      • From: Paul Skinner <email@hidden>
  • Prev by Date: Re: Faster List Checking
  • Next by Date: re: dead (was Re: Faster List Checking)
  • Previous by thread: Re: Getting an app's identifier
  • Next by thread: Re: Getting an app's identifier
  • Index(es):
    • Date
    • Thread