How to add a Service to Accessibility permissions

accessibilityapplescriptautomator

I have a Quick Action which I wrote in Automator (it runs an AppleScript). It is launching from a keyboard shortcut correctly (using this).

However, when I try to give it permissions in System Preferences > Security & Privacy > Accessibility, it won't allow me to select the workflow file (it's grey'd out).

Is there any way to achieve this?

  • Launch an AppleScript from a keyboard shortcut
  • AND allow it to send keystrokes (so give it Accessibility permissions)

Best Answer

Here's the roundabout way I achieved it.

  1. In Automator write your application, and save it as an Application (foo.app)
  2. In Automator, create a separate Quick Action. Get that Quick Action to launch the previous Application you created (launchfoo.workflow)
  3. System Preferences > Security & Privacy > Accessibility: Add foo.app to the permissions
  4. System Preferences > Keyboard > Shortcuts > Services: Give launchfoo a shortcut