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.
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
- Take the script apart: which statements talk to an app, and which talk to System Events and involve clicks or keystrokes.
- Only the first kind: run it once and click Allow in the prompt.
- Includes the second kind: add the program that launches the script to the Accessibility list and turn it on.
- After changing Accessibility, quit and reopen that program, then run the script.
- After changing how the script is launched (for example from manual to a scheduled job), check both permissions again.
Related questions
- iMessage, AppleScript and Shortcuts on a rented Mac mini: it runs, but Apple decides about your account
- Can an AI agent control the screen and browser on a rented Mac?
- How do I fix AppleScript error -1743, “Not authorized to send Apple events”?
- Can I turn on Full Disk Access on a rented Mac to read the Messages database?
- How do I tell whether a macOS app can be controlled by a script?
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:
- What am I not allowed to use a rented Mac mini for?
- Will support ever ask for my password or Apple ID?
- Can Shortcuts run automatically on a schedule on a remote Mac mini?
- Do Automator and Folder Actions still work on a rented Mac mini?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support