Stop macro
Ends this macro's run right now and marks it cancelled.
Stop the macro
Keyboard Maestro: Cancel, CancelJustThisMacro, CancelThisMacro, CancelAllMacros
Details #
Stops the run at this step. Nothing after it runs, in loops or in groups. The run is marked cancelled in the Trace, not failed, so it raises no error.
Use it behind an If when there is nothing to do: the wrong app is in front, a file is missing, the input is empty.
When this macro was started by Run macro, only this macro stops. The macro that called it carries on.
Stop unless there's work
Do
- Set pending to 0
- If pending is 0
- Stop the macro
- Show “Working…”
Parameters #
This step takes no parameters.
Examples #
Bail out of a loop and the macro
Do
- Repeat 5 times
- If i is above 2
- Stop the macro
Gotchas #
To leave only a loop, use Break out of repeat. To end the macro with a result, use Return a value.
It stops this run only. Other runs of the same macro are not touched.