Jump to content

Recommended Posts

Posted

I'd like to mute the system sound for the duration that the script run, then restore the master volume. The only thing that I found was SoundSetWaveVolume which only pertains to wave volume and does not work on Win7.

I saw some threads from 2007 about it. Has this feature been added to AutoIt by any chance?

Posted

I had some trouble with this a while ago. For some reason Send(Chr(0xAD)) didn't work. (0xAD being the hex code for the mute button), but I found a script somewhere that I could translate into this:

Local $oWShell = ObjCreate("WScript.Shell")
$oWShell.SendKeys(Chr(0xAD))

Which does the trick. Might not be the best way though.

Posted

Does this not work for you? It does on two laptops I have running Win7 & Vista.

Send("{VOLUME_MUTE}")

:) Works for me. I must have overlooked that when I last struggled with it.
Posted

... when I last struggled with it.

AutoIt and these lines of code have prevented me from kicking my own butt for not getting a laptop with external multimedia controls..

Switch @HotKeyPressed
    Case "{F2}"
        Send("{VOLUME_MUTE}")
    Case "{F3}"
        Send("{VOLUME_DOWN}")
    Case "{F4}"
        Send("{VOLUME_UP}")
EndSwitch

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...