Browse the docs

Apply a kit's settings preset

Applies, or undoes, one of an App Kit's settings presets: a named set of an app's preferences and controls.

Apply the preset name

Details #

An App Kit can carry presets in its kit.json: a defaults list of preference keys and values for the app, and controls, setControl steps for what the preferences do not cover. This step applies one.

The defaults are written while the app is quit, so a preset that has them needs the app closed. With quit on, the step asks the app to quit (it never forces it), writes the values, opens the app again and runs the controls in its Settings window. Without it, the step fails and says the app has to quit first.

The first apply keeps the old values. undo puts them back, and sets the controls back to what they were.

Parameters #

ParameterTypeRequiredValuesWhat it does
nametextYesThe preset's name in the kit's presets. Required.
kittextThe kit's id. Default: the kit this macro is in.
quityes / noLet the step quit the app and open it again.
undoyes / noPut the app's settings back as they were before the preset.

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

Examples #

Switch Mail to the Presentation preset
Do
  1. Apply the preset “Presentation”
Open in Switchboard to try it

Gotchas #

  • A macro outside an App Kit has to name the kit with kit.

  • A control step that fails is reported with the preset; the values already written stay until you undo.

See also #

Set a control