Turn on macro
Turns a macro, or a whole macro group, on so its triggers fire again.
Turn on macro
Keyboard Maestro: SetMacroEnable
Details #
Sets a macro or a group to enabled. 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. If a name matches more than one macro the step fails and asks for the id. Groups are found by id first, then by name; the first match is used.
The change is saved to the Library like any edit and appears in the macro's history as made by the engine. Setting something that is already on does nothing. The Trace note says so.
Set state to false to do the opposite and turn it off. That makes enableMacro with state: false the same as Turn off macro.
- Turn on 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 #
- Turn on another macro
- Show “Morning routine is on”
Gotchas #
Turning a macro off does not stop a run that is already going.