Jump to content
Sign in to follow this  


Recommended Posts


Do it is possibile a function to test if sound volume is mute or not?

Share this post

Link to post
Share on other sites


I think there's no way to know if the master volume has been set to mute. If it works for you, you could use Volly's Audio.au3 and do something like this:

#include <Audio.au3>
If $Vol=0 Then MsgBox(0,"","It's mute")

This will only work if your master volume is set to 0, not mute.

Put 'help with audio functions' in the description of your thread so users who know how this works can help better.

Share this post

Link to post
Share on other sites

Ty, it is good; but i would to knows the volume status after use of


Share this post

Link to post
Share on other sites

Hi Guys,

Or, the other way around:

I would like to check if audio is muted, If it's not, send {VOLUME_MUTE}, else, leave is as it is.

I'm working on a script that spawns a lot of messages (1 every second), whitch "bongs" the

default Windows sound. This is realy anoying.. so I put a Send("{VOLUME_MUTE}") at

the beginning (whitch should mute audio) and another Send("{VOLUME_MUTE}") at the

end, whitch sould restore the audio to not-muted... unless... the user has already muted

the audio. In that case my script actually ENABLES audio, and mutes back at the end of the script.

Here's wat I would like: at the beginning of the script, I would like to save the current state of muting

(like 0=muted, 1=not muted) and then if $muteState=1, mute the audio.

At the end of the script, restore the mute state saved earlier...

Can anyone help?




Share this post

Link to post
Share on other sites

I think you can check the mute status through some strange api calls. i went cross-eyed when I saw them.

Here's a crude way to check if audio is muted:

winwait("Volume Control")
$mute_query= ControlCommand ("Volume Control","","[TEXT:&Mute all]","IsChecked" )
If $mute_query=1 Then
    msgbox(1,"","Audio is muted.")
    msgbox(1,"","Audio isn't muted.")

Alternatively with _SoundGetMasterVolume(), you can store the current setting, set the volume to 0, then restore the setting when the script is done.

Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.