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 #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
name | text | Yes | The preset's name in the kit's presets. Required. | |
kit | text | The kit's id. Default: the kit this macro is in. | ||
quit | yes / no | Let the step quit the app and open it again. | ||
undo | yes / no | Put the app's settings back as they were before the preset. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Apply the preset “Presentation”
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.