Recurring "UI element scripting is not enabled." in Mavericks AppleScript

Nov 01, '13 06:46:00AM

Contributed by: mjerde

If you use AppleScript applets to interact with UI elements, you may quickly find out that in Mavericks all seems to be broken. Every run results in System Preferences being opened to the pane that used to control UI Element Scripting, and finding the new controls in Security & Privacy -> Privacy -> Accessibility seems to have no effect.

This is a result of Mavericks splitting UI control authorization into per-app settings, combined with the Lion feature of remembering what windows an app had open when it was last closed.

These two features end up caught in a fight.

The following Terminal command will prevent this by passing ownership of the applet to root and blocking you from editing it without authenticating.

sudo chown -R root:wheel AppletName.app

References:
OS X: Using AppleScript with Accessibility and Security features in Mavericks

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20131025064624795