System volume
Sets, raises, lowers or mutes the Mac's output volume.
op the volume
Keyboard Maestro: SystemAction, SetSystemVolume
Details #
Changes the Mac's main output volume, from 0 to 100. op chooses what to do:
set sets the volume to
value. Needsvalue; it is held between 0 and 100.up and down change the volume by
valuepoints (amountis another spelling). The default is 6.25, which is one notch of the keyboard volume keys. The result is held between 0 and 100. up also unmutes the Mac if it was muted.mute and unmute set the mute switch.
toggleMute flips it.
The output is the new volume (a number) for set, up and down, and true or false (muted) for the mute operations. The Trace note reads volume 40, muted or unmuted.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
op | one of | Yes | set up down mute unmute toggleMute | Required. set, up, down, mute, unmute or toggleMute. Anything else fails. action is another spelling of op. |
action | text | |||
amount | any value | Another spelling of value for up and down. | ||
value | any value | For set, the level from 0 to 100. For up and down, the number of points. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Turn the volume down
- Show “Quieter”
Run it in a dry run first to see the steps without touching the volume.
Gotchas #
Fails with
volume set needs a value from 0 to 100whensethas no value.The volume is the system output volume. The volume inside Music or Spotify is separate; use Music and player control.
In a dry run the step is simulated and the volume does not change.