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

Re: application file id?


  • Subject: Re: application file id?
  • From: Jeffrey Berman <email@hidden>
  • Date: Mon, 05 May 2003 16:53:22 -0500

On 5/5/03 10:22 AM, Christopher Nebel <email@hidden> wrote:

>> I noticed that 'info for' does not return the bundle identifier. is there
>> some way to discover the identifier via script?
>
> Not as such, no, but you could fake it with "do shell script":
>
> set a to choose application as alias
> do shell script "grep -A1 CFBundleIdentifier " & quoted form of POSIX
> path of a & "/Contents/Info.plist"
>
> The last line will contain the bundle identifier. Getting *exactly*
> the bundle identifier is left as an exercise for the reader.

How about this?

set TargetApp to choose application as alias

do shell script "awk ' /CFBundleIdentifier/ {{{getline} print
substr($0,10,length($0)-18)} exit}' " & quoted form of POSIX path of
TargetApp & "/Contents/Info.plist"

-Jeffrey Berman
_______________________________________________
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.

  • Prev by Date: RE: Setting Page Setup in Quark
  • Next by Date: Re: application file id?
  • Previous by thread: Re: application file id?
  • Next by thread: Re: application file id?
  • Index(es):
    • Date
    • Thread