Changes a mute setting of a sound device.
SoundSetMute NewSetting , Component, Device
Type: Integer
One of the following values:
1
or True
turns on the setting0
or False
turns off the setting-1
toggles the setting (sets it to the opposite of its current state)If blank or omitted, it defaults to the master mute setting. Otherwise, specify the component's display name and/or index, e.g. 1
, "Line in"
or "Line in:2"
.
For further details, see Component (Sound Functions).
If blank or omitted, it defaults to the system's default device for playback (which is not necessarily device 1). Otherwise, specify the device's display name and/or index, e.g. 1
, "Speakers"
, "Speakers:2"
or "Speakers (Example HD Audio)"
.
For further details, see Device (Sound Functions).
A TargetError is thrown if the device or component could not be found or if the component does not support this control type. Otherwise, an OSError is thrown on failure.
An alternative way to toggle the master mute setting of the default playback device is to have the script send a keystroke, such as in the example below:
Send "{Volume_Mute}" ; Mute/unmute the master volume.
To discover the capabilities of the sound devices installed on the system -- such as the names and available components -- run the soundcard analysis script.
Use SoundGetMute to retrieve the current mute setting.