Choose the automation
Choose the smallest tool
Select Shortcuts, a shell script, AppleScript, or launchd according to the boundary the task actually crosses.
macOS gives you several automation tools, and they overlap. The mistake I see most often is reaching for the most powerful one. Pick the smallest tool that crosses the boundary your task crosses.
The four options
Shortcuts is for gluing app actions together. Use it when the workflow connects supported app features and needs a Finder, Share Sheet, or keyboard trigger. It’s the friendliest of the four, and the only one that also runs on iPhone and iPad.
A shell script is for files, text, and commands. If the task is “take these files, transform them, put them there”, a script in ~/bin is usually the whole answer. It runs without anyone watching.
AppleScript is for talking to apps. When a scriptable application exposes an operation through Apple events, AppleScript is the sanctioned way to ask Finder, Mail, or Notes to do something from the outside.
launchd is for when, not what. It starts a command at login, on a schedule, or when a watched path changes. launchd starts things. It does not transform data.
A quick decision test
Ask what boundary the task crosses:
only files and text -> shell script
needs actions inside an app -> AppleScript, or a Shortcuts action
needs a Finder or hotkey trigger -> Shortcuts wrapping the script
needs to run unattended -> launchd starting the script
These compose. The shape we’ll build in this course: a shell script does the work, a Shortcut triggers it from Finder, and a LaunchAgent runs the same script every fifteen minutes. Each tool stays in its lane.
The tool to avoid
Don’t begin with UI clicking. UI scripting simulates a user moving through windows and menus. It breaks when a button moves, a label changes, or an unexpected dialog appears. It also needs Accessibility permission, the broadest grant on the system.
Reach for it last, after every other interface has failed you. A later lesson covers how to contain it when you truly have no choice.
How you know you picked wrong
Friction. If your Shortcut has become one giant “Run Shell Script” action, the task wanted a script. If your script is mostly osascript calls, the task wanted AppleScript from the start.
When that happens, move the logic to the right tool. Don’t keep patching the wrong one. It’s a ten-minute job now and a weekend job later.
Take the task card from the previous lesson and run it through the decision test. Write the tool next to each line. For the screenshot task, the answer is a script, with Shortcuts and launchd as triggers.
Lesson completed