Browse the docs

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 a macro group on
Do
  1. Turn on the group “Work”
Open in Switchboard to try it

Parameters #

ParameterTypeRequiredValuesWhat it does
grouptextGroup id or name.
idtextSame as macro.
macrotextMacro id or name.
stateyes / noDefault true. false reverses the step.
toggleyes / notrue flips the current on or off state instead, and then state is ignored.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Enable one macro by id
Do
  1. Turn on another macro
  2. Show “Morning routine is on”
Open in Switchboard to try it

Gotchas #

  • Turning a macro off does not stop a run that is already going.

See also #

Turn off macro, Run macro