Re: Scripting Contacts in Mountain Lion
Re: Scripting Contacts in Mountain Lion
- Subject: Re: Scripting Contacts in Mountain Lion
- From: Shane Stanley <email@hidden>
- Date: Fri, 21 Sep 2012 09:40:52 +1000
On 20/09/2012, at 9:16 AM, Shane Stanley <email@hidden> wrote:
> It looks to me that Address Book scripting doesn't work in ML. Presumably it's a victim of the clamp down on apps milking people's contacts.
So it looks like this is quite wrong, and it works much as before. However, there's an issue to be aware of:
When you first run an app addressing Contacts, whether a script editor or script app, the user will be asked if it should be allowed access to Contacts. (Apparently I'd already said no, so instead of the dialog I got failure.) To change the setting, you need to go to System Preferences -> Security & Privacy -> Privacy, where all the apps that have asked for access are listed.
The catch is that you try to change or remove the setting for an AppleScript applet, you will get an Internal Error dialog *unless* the applet has a bundle identifier:
Exception Name: NSInternalInconsistencyException
Description: Invalid parameter not satisfying: bundleIdentifier != nil
User Info: (null)
At this stage, I believe only AppleScript Editor in 10.8.x and AppleScriptObjC Explorer are adding a bundle identifier to saved apps by default. So if you're going to script Contacts from an applet, you need to ensure there's a CFBundleIdentifier entry in its Info.plist.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <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