Question

I reached a dead end with my noob research re the SoundSet command. I'd appreciate a script or a pointer.

I don't know how to make this command toggle:

F11::SoundSet, 2

I can see how to make master mute toggle - but not this 'mostly mute' to 2% level (for muting ads while monitoring for a show to come back on). Thanks.

(Note: this for Windows XP if that's relevant)

Was it helpful?

Solution

F11::
    if (muting) {
        SoundSet, %oldVolume%
        muting := false
    }
    else {
        SoundGet, oldVolume
        SoundSet, 2
        muting := true
    }    
return

Basically, you create a variable muting so your script can recall which state it's in. When you hit F11, it checks if muting is true or not. If it is, then it will set the system volume to oldVolume, and then set muting to false. If muting is false, then it will save the current volume as oldVolume, set the system volume to 2, and then set muting to true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top