Hi all,
I had a simple AppleScript app that enabled Internet Sharing through GUI scripting. After installing Mavericks, enabling the App in System Pref–>Security Privacy → Accessibilty and running it, I get an error message that says
“InternetSharing is not allowed assistive access”. Any idea what I need to resolve this and get the App running?
The weird thing is that If I run the script using AppleScript Editor, it works fine.
Now it’s letting me reply. Odd.
So it looks like Mavericks now has a “per app” security. This is smart on some levels, but it means that if you spin out half a dozen applescripts as “apps” you have to give them each permission to use the accessibility commands.
(It appears that script editor has a “free pass” on security, which sort of makes sense)
To do this:
- run the app and get the alert saying permission denied
- go to the SYSTEM prefs (under the apple menu)
- go to Security & Privacy
- select “accessibility” on the left
- unlock your prefs (bottom left of preference pane)
- check off any apps you want to give permission to
I have a nearly identical problem. I have an AppleScript that contains some System Events commands. When run from the editor, it works fine. When run as an app I get the “not allowed assistive access” message. I’ve enabled access as described in the earlier message but I still get the error. As a test, I wrote the following script that exhibits the problem:
tell application "Finder" to open file "Basement Macintosh HD:Users:Shared:Working Data:acquisitionMethodCode.xls"
tell application "Microsoft Excel" to activate
delay 5
tell application "System Events" to tell process "Excel" to tell window 1
if get role description = "dialog" then
click button 1
end if
end tell
As an explanation, my actual script opens 500 spreadsheets one at a time and some open with a dialog that must be dismissed. This code does the job.