Cancel other macros
Stops the running copies of another macro, or every other running macro.
Cancel running macro
Keyboard Maestro: Cancel a Specific Macro, Cancel All Other Macros
Details #
Stops runs that are going on now. It does not stop the macro it is in; use Stop macro for that.
With macro, it stops every running copy of that macro. Give the macro's id or its name.
With others set to true, it stops every running macro except this run and the run that started it (if this macro was started by another).
The output holds cancelled, the number of runs stopped. If nothing else was running, that is 0 and the Trace says so.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
id | text | Another spelling of macro. | ||
macro | text | The id or name of the macro to stop. Required unless others is true. | ||
others | yes / no | true to stop every other running macro. Default false. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Cancel every other running macro
- Show “Other macros cancelled” for 2 s
Gotchas #
The step fails with "cancelMacros needs a macro, or others: true" when you give neither, and with "no macro ... to cancel" when the name or id matches nothing.
If both macro and others are given, macro wins and only its copies are stopped.
Test it with Try it (dry run) first. A real run stops those macros mid-step.