• 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: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example


  • Subject: Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
  • From: Shane Stanley <email@hidden>
  • Date: Sun, 15 May 2016 12:17:02 +1000

On 15 May 2016, at 12:24 AM, Christopher Stone <email@hidden> wrote:

Okay, let's grab those same values with ASObjC.

Cool. Just be aware that NSWorkspace is in the AppKit framework, not Foundation, so it should have an extra "use framework" statement. And I suspect you're a bit lucky that "theURL as text" is working; it should be "theURL's |path|() as text".

Here's a slightly shorter version that uses NSBundle instead:

use framework "Foundation"
set bundleID to "com.satimage.Smile"
set theBundle to current application's NSBundle's bundleWithIdentifier:bundleID
set theDict to theBundle's infoDictionary()
set asojcSmileShortVersionString to (theDict's valueForKeyPath:"CFBundleShortVersionString") as text
set asojcSmileCFBundleVersion to (theDict's valueForKeyPath:"CFBundleVersion") as text


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
      • From: Shane Stanley <email@hidden>
References: 
 >ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example (From: Christopher Stone <email@hidden>)
 >Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
  • Next by Date: Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
  • Previous by thread: Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
  • Next by thread: Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
  • Index(es):
    • Date
    • Thread