Sign in to follow this  
Followers 0
flyingboz

Determine Current Sound Volume

10 posts in this topic

Short Story:

App uses traytip to provide visual notification. When this happens via au3, it includes an annoying beep.

Desire to stop the annoying beep.

One way of doing this would be to set the sound volume to zero on execution, and reset it at script completion.

Unfortunately, I don't see a way in au3 to detect the current system volume level , such that I can save / restore it as desired.

Suggestions to solve this issue by eliminating the beep in the first place and / or being able to save the current volume welcomed.

As I write this , it strikes me that a mute / unmute function would also suffice, were there a nice way to do so.

Would love to have a solution for the most general case, however -- which would be to detect / save / restore the current volume after doing whatever I wanted w/ it.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites



Does this work on your system?

Send("{VOLUME_MUTE}")


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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

This and many other GREAT additions to your script.... Autoit Wrappers

http://www.autoitscript.com/forum/index.php?showtopic=19370&view=findpost&p=133776

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I assume you have considered:

SoundSetWaveVolume()

Yes, ty.

Point is to set it back exactly where it was, not some arbitrary number.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Does this work on your system?

Send("{VOLUME_MUTE}")

This indeed works properly on XP. Thanks for the addition to my toolset. Valuater's link to the appropriate DLL Call wrapper will be the basis for the solution of choice, as it covers the generic use case, and enables me to build a TrayTipSilent() UDF that properly restores volume at the end of the function. If I understand the applicable differences in win7, vista, xp and w2k correctly, this choice will also (where possible) change the volume for the affected process, not the entire session, whereas mute is a system-wide setting. Edited by flyingboz

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

This and many other GREAT additions to your script.... Autoit Wrappers

#133776

8)

@Valuater

Thanks, not only for this, but all you do for the AutoIT community. I have bookmarked the above UDF for later perusal, and now am at work building my TrayTipSilent() UDF, which suddenly got very easy :(


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

This indeed works properly on XP.

It works for me too. My laptop runs Vista Home Premium O/S, the sound card is made by Realtek, I don't know or care what the specific model is.. it, the speakers and Winamp work.. :(

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

Share this post


Link to post
Share on other sites

@Valuater

Thanks, not only for this, but all you do for the AutoIT community. I have bookmarked the above UDF for later perusal, and now am at work building my TrayTipSilent() UDF, which suddenly got very easy :(

Your welcome flyingboz!!!

... and thanks for the kudos!!

8)


NEWHeader1.png

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  
Followers 0