rgelb Posted February 12, 2011 Share Posted February 12, 2011 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 More sharing options...
Tvern Posted February 12, 2011 Share Posted February 12, 2011 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 More sharing options...
somdcomputerguy Posted February 13, 2011 Share Posted February 13, 2011 Does this not work for you? It does on two laptops I have running Win7 & Vista. Send("{VOLUME_MUTE}") - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Tvern Posted February 13, 2011 Share Posted February 13, 2011 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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 13, 2011 Share Posted February 13, 2011 ... 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 More sharing options...
AdmiralAlkex Posted February 13, 2011 Share Posted February 13, 2011 See thread for how to see if sound is muted .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now