systemVolume
Returns the Mac's output volume as a number from 0 to 100.
Keyboard Maestro: SYSTEMVOLUME, SystemVolume
Details #
systemVolume() takes no arguments and returns a number from 0 to 100: the output volume of the current sound output. It asks macOS through AppleScript, which takes a moment.
Parameters #
Takes 0 arguments.
{{ systemVolume() }}
Examples #
systemVolume()→
0systemVolume() > 50→
falseGotchas #
Calling it with an argument is an error:
systemVolume() takes 0 arguments, got 1.If the volume can't be read within three seconds, the answer is 0, which looks the same as muted.