ms_news Posted October 31, 2006 Share Posted October 31, 2006 hello autoit-Users, can you help me with a little problem. i toggle the master sound with Send("{VOLUME_MUTE}"), but how i find the state (is the volume off or on!)? thx for help ms_news Link to comment Share on other sites More sharing options...
ms_news Posted October 31, 2006 Author Share Posted October 31, 2006 No Idea? Link to comment Share on other sites More sharing options...
buzz44 Posted November 1, 2006 Share Posted November 1, 2006 (edited) Func _WaveVolGet() Local $WaveVol = -1, $p, $ret Const $MMSYSERR_NOERROR = 0 $p = DllStructCreate ("dword") If @error Then Return -1 EndIf $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr ($p)) If ($ret[0] == $MMSYSERR_NOERROR) Then $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData ($p, 1), 8), 4)) / 0xFFFF * 100) EndIf DllStructDelete ($p) Return $WaveVol EndFunc ;==>_WaveVolGetTry this, thanks to gafrost . I THINK it should return 0 if the sound is muted but I can't test it, sorry.Edit:Try here for a slightly updated version of the function > http://www.autoitscript.com/forum/index.ph...p;hl=sound+mute Edited November 1, 2006 by Burrup qq Link to comment Share on other sites More sharing options...
GaryFrost Posted November 1, 2006 Share Posted November 1, 2006 (edited) also http://www.autoitscript.com/forum/index.ph...st&p=133776and Mixer http://www.autoitscript.com/forum/index.ph...st&p=149390 Edited November 1, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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