Jump to content

Sound support?


rgelb
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

... 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.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...