Testing Current System Mute State

I have a macro that turns on (or off) the System Sound Mute using the Toggle System Sound Mute action. But, the macro, which runs periodically, needs to know if the sound is already muted so it doesn't accidentally un-mute when it wants to mute -- or vice versa. The only workaround I have found is to first set the volume up one notch and then down one notch -- at that point the sound is not muted. From there, the macro can mute (or not). However, changing the volume when not muted causes a beep that I don't want to hear..

Is there a way to test the mute state directly? (Without using AppleScript because it might run while the ScreenSaver is on.)

Hey Jeffrey,

The only way I know of to do this is with AppleScript:

output muted of (get volume settings)

Although it might be possible with Swift. Any way you look at it you're going to have to run some kind of script.


1 Like

@ccstone. Thanks, that works, even with the ScreenSaver running (apparently because that script does not manipulate the UI).

1 Like