Recording a macro
What the Recorder writes down when you click, choose a menu command, switch apps or copy and paste, and how to record a fix into the middle of a macro.
The editor's Record command (⇧⌘R) turns what you do into steps. It writes down what each action meant, not the keystroke or the pixel, so the macro reads like a sentence and keeps working when a window moves or an app is updated.
What the Recorder understands #
| You do | It records |
|---|---|
| Choose an item from the menu bar (File › Export…) | Choose File › Export, with the app set, so it runs with the app in the background |
| Press a menu shortcut (⌘S) | The same menu step (Choose File › Save), with the keys in its label: the Recorder reads the app's menu to know that ⌘S is File › Save |
| Tick a checkbox, switch a switch, pick a radio button or a tab | Set … to on (a Set a control step), the state the control ended in, so running the macro twice changes nothing the second time |
| Choose an item from a pop-up button | Set Format to JPEG. The click that opened the pop-up is dropped |
| Switch to another app (⌘Tab, the Dock, clicking its window) | Activate Mail. Switching twice with nothing between keeps only the last, and switching back to where you were records nothing |
| Press the hotkey of another macro of yours | Run that macro |
| Copy with ⌘C or ⌘X | The key press, then Read the clipboard into copied. The text is kept with the step (up to 2 KB), so a dry run and a test have it |
| Paste with ⌘V | Paste what was copied when the clipboard still holds the text you copied |
| Type the text you just copied, or today's date | Type {{copied}}, or the date as {{date("yyyy-MM-dd")}} (also d MMM yyyy, M/d/yy and MMMM d, yyyy) |
Anything else stays what it was: a click is a click on the element, typing is a type step, a chord with no menu item is a key press. ⌘C, ⌘X, ⌘V, ⌘A, undo and redo are never turned into menu steps (the title of Undo changes with what it undoes). A click on something disabled stays a click.
While you record, the panel lists the steps as sentences and the bar at the top shows the last one: Recorded: Choose File › Export. If every step acts in one app, a Scope the group to checkbox offers to make the macro's group run only there (it applies when the group runs everywhere, and is one more Undo).
Record from here #
A step in the middle of a macro broke, say after an app update. Macro › Record from Here (⌥⇧⌘R, or the step's context menu) fixes it where it is:
Select the step that should come out different. It has to be a top-level step with steps before it (inside a repeat or an if, the state depends on the branch).
Switchboard asks first: Steps 1–5 will really run, then recording starts at step 6. Choose Run Live. Dry Run is offered only when every step before it is safe to run in a dry run.
The debugger runs the steps before it and pauses: Paused before step 6 · ready to record. The Recorder starts. Do the fix in the app.
Press ⎋ or Done. The new steps are inserted before step 6 as one Record Steps edit, and the paused run is stopped (the new steps haven't run in it, so continuing would do things twice). Cancelling stops the run too.
If a step before the chosen one fails, the run shows the failure as usual and recording doesn't start: fix that first.
Re-record on one step is unchanged: it picks a new element for that step. Record from Here records a sequence.
Permissions #
Recording needs the Accessibility and Input Monitoring permissions, like the rest of finding things on screen. It pauses while a password field is active and keeps nothing typed there.