Home/Q&A/How do I tell whether a macOS app can be controlled by a script?

How do I tell whether a macOS app can be controlled by a script?

Updated · airankrush

Direct answer

It depends. If the app has a scripting dictionary, AppleScript can call its features; if it has none, all you can do is simulate clicks with UI scripting, which works but is fragile. On a rented machine you can install the app and check for yourself.

Basis

  • How to check: open the built-in Script Editor and choose Open Dictionary from the File menu. The apps in that list are the ones that declare scripting support; open one to see the objects and commands it offers.
  • Apple's own Finder, Mail, Calendar, Reminders, Notes, Safari, and Keynote, Pages and Numbers generally have dictionaries. Third-party apps vary a lot: professional software is often well supported, while apps packaged from web technology mostly have none.
  • The options, in order of reliability: the app's scripting dictionary or its command-line tool is the most stable; next come the actions the app exposes to Shortcuts; UI scripting through System Events, clicking menus and pressing keyboard shortcuts, comes last.
  • The customer account can install apps. App Store apps are downloaded with your own Apple Account, and licenses for other software are yours to buy and confirm.

Information as of .

Boundaries: when the answer is different

A command being listed in the dictionary does not mean it works; some apps have not updated their dictionary in years, so test commands one at a time. UI scripting depends on button names and window structure, can break whenever the app updates, and needs the desktop session to be unlocked. Some software licenses limit the number of devices or restrict automated batch processing; whether that use is allowed on a rented machine is something you need to confirm with the software vendor, and we cannot make that call for you. What software is on the machine at delivery is stated in the delivery notes, so do not assume a particular professional app is preinstalled. For how to read a dictionary, see Apple's Script Editor User Guide.

How to do it

  1. Install the target app on the remote Mac and complete its own sign-in or activation.
  2. Open the app's dictionary in Script Editor and find the commands that match your task.
  3. Write three to five lines that do one thing only, such as creating a document or exporting a file, run it, and allow the Automation prompt.
  4. For features missing from the dictionary, check whether the app offers Shortcuts actions or a command-line tool.
  5. Write a UI script only when none of those exist, and locate elements by name, not by screen coordinates.

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