Turn off macro
Turns a macro, or a whole macro group, off so its triggers stop firing.
Turn off macro
Keyboard Maestro: SetMacroEnable
Details #
Sets a macro or a group to disabled. Name exactly one: macro (or its alias id) or group. Naming both, or neither, fails the step.
Macros are found by id first, then by name, ignoring case. A name that matches more than one macro fails the step and asks for the id. The change is saved to the Library as an edit made by the engine. Turning off something that is already off does nothing and says so in the Trace.
Set state to false to reverse the step and turn it back on.
- Turn off the group “Work”
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
group | text | Group id or name. | ||
id | text | Same as macro. | ||
macro | text | Macro id or name. | ||
state | yes / no | Default true. false reverses the step. | ||
toggle | yes / no | true flips the current on or off state instead, and then state is ignored. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Show “One-time setup”
- Turn off another macro
Gotchas #
A macro that disables itself still finishes its current run.
You need to turn it back on yourself, with Turn on macro or in the Library.