Home/Q&A/Automation vs Accessibility permission on macOS: which does my script need?

Automation vs Accessibility permission on macOS: which does my script need?

Updated · airankrush

Direct answer

It depends on what the script does. Sending commands to an app needs Automation, granted in pairs of who controls whom; simulating clicks and keystrokes through System Events needs Accessibility turned on as well.

Basis

  • Automation covers Apple Events: a script telling Mail to create a message or Finder to move a file belongs here. The permission is granted per pair of programs; allowing Terminal to control Mail does not allow Terminal to control Calendar.
  • Accessibility covers the interface: reading the buttons and text in a window, clicking for you, typing keys. Once granted to a program it applies to every app's interface, with no per-app distinction, so its scope is far wider than Automation.
  • They appear differently: Automation prompts by itself the first time control happens; Accessibility is usually something you turn on by hand under Privacy & Security after the script reports an error, and the system only takes you to that page.
  • A typical UI script has System Events click an app's menu, and that uses both: the launching program must be allowed to control System Events, and the launching program must also have Accessibility permission.

Information as of .

Boundaries: when the answer is different

Two neighboring permissions are easily confused with these: reading what is on the screen needs Screen & System Audio Recording, and reading protected files needs Full Disk Access; neither is covered by the two switches above. When granting permissions on a rented machine, add only your own programs and do not switch off or delete entries already in the list; UU Remote and RustDesk also rely on Accessibility to pass on your keyboard and mouse input. The names and locations of these pages change between system versions, so go by what the machine actually shows. If a particular switch cannot be changed, contact support; we do not guarantee all of them can be opened up.

How to do it

  1. Take the script apart: which statements talk to an app, and which talk to System Events and involve clicks or keystrokes.
  2. Only the first kind: run it once and click Allow in the prompt.
  3. Includes the second kind: add the program that launches the script to the Accessibility list and turn it on.
  4. After changing Accessibility, quit and reopen that program, then run the script.
  5. After changing how the script is launched (for example from manual to a scheduled job), check both permissions again.

Use case

This question belongs to the use case: iMessage, AppleScript and Shortcuts on a rented Mac mini: it runs, but Apple decides about your account

Other questions in the same use case:

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All Q&A