I have been trying to use osascript to run a GUI-scripting Applescript in the background. The GUI-scripting action the Applescript performs is to click on a TextEdit menu item. It always worked in the past, but now I get the following error message:
I added /usr/bin/osascript to the assistive access database as described in this post: http://jacobsalmela.com/bash-script-enable-access-assistive-devices-programmatically-os-x-mavericks-10-9-x-simulate-keystrokes/ osascript does indeed show up in the System Preferences Security & Privacy pane as enabled, yet the error message continues to occur when I try to execute the osascript.
I found several discussions on the web describing this very problem with assistive access for osascript, but could not find any solutions.
I would be most grateful for any ideas about how to grant assistive access to osascript.