Re: ASObjC to Find an App with Bundle-ID and XMLLib.osax Read Plist Example
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
|
_______________________________________________
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