If your script uses things like tell application "System Events" to get UI data from app windows or send virtual keystrokes, etc, then it'll require "assistive access". Hopefully this helps others who are looking for a fix. Important note regarding AppleScript actions in Automator workflows. Tell application "System Events" to tell process "System Preferences"Ĭlick checkbox 1 of tab group 1 of window 1 I just succeeded at implementing this alternative script to accomplish the same thing, but it also only works when Automator has focus and has the same issue when it does not: tell application "System Preferences" when trying to run the script using the keyboard command of the service that runs the script. I continue to get the same message notifying me that Automator Runner is not allowed assistive access. It now appears with a checked box in the list of applications with assistive access: I found Automator Runner.app and gave it assistive access using the instructions found here. Wrapping it in a try block with some error reporting yields the following:Īutomator Runner is not allowed assistive access. However, when I make a service that runs it and assigned a keyboard shortcut to the service, it fails to run via the keyboard shortcut. This script runs without issues when the "play" button in Automator is used to execute it. Set current pane to pane ""Ĭlick radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"Ĭlick checkbox 1 of tab group 1 of window "Trackpad"
I have the following AppleScript which toggles the scroll direction on the trackpad: tell application "System Preferences"