muncherw Posted February 20, 2009 Share Posted February 20, 2009 When a message box pops up from an AutoIt script Windows beeps at you to alert you the box is there. I'd like to prevent that sound from happening when I use msgbox. I realize this is a function of Windows and not of the msgbox function but I'm sure creative scripting has a way around it. I'd like to prevent that sound from happening when I use msgbox. I was looking at an example script for something unrelated that popped up like 30 msgboxes in a row and it made someone near my desk a little agitated. I shot him with a rubber band but that didn't seem to solve anything. My initial idea was to use Volley's sound UDF and just mute the sound before a msgbox and unmute after but that really puts a damper on listening to music. I could change the windows scheme to not have a sound for that event (Default Beep) but I don't really want to do that as sometimes it is useful to get that beep. Any suggestions? Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
Developers Jos Posted February 20, 2009 Developers Share Posted February 20, 2009 Create your own _MsgBox() Func in which you create the MSGBOX with a GuiCreate() ... Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 20, 2009 Share Posted February 20, 2009 I found this on Google: http://www.wpuniverse.com/vb/showthread.php?threadid=27776It basically tells you to change the sound in the Sound panel from Configuration, by registry editing. Or set the wave volume to 0.I would go with the sound in control panel as well, show the messagebox, then immediately put the sound back to what it was. github.com/jvanegmond Link to comment Share on other sites More sharing options...
muncherw Posted February 20, 2009 Author Share Posted February 20, 2009 Thanks for the ideas. I'll look into both options and post something when I get something. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
ResNullius Posted February 20, 2009 Share Posted February 20, 2009 I found this in my signature http://www.autoitscript.com/forum/index.ph...&pid=387023 Link to comment Share on other sites More sharing options...
muncherw Posted February 20, 2009 Author Share Posted February 20, 2009 Here is what I came up with based on Manadar's idea of turning off in the registry. RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "", "REG_EXPAND_SZ", "") MsgBox(0, "Quiet", "You can't hear this") RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "", "REG_EXPAND_SZ", "%SystemRoot%\media\Windows XP Ding.wav") ResNullius- Saw your answer while I was typing this. I'll check it out. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
Authenticity Posted February 20, 2009 Share Posted February 20, 2009 (edited) But you're blocking the overall volume for someone listening to music maybe? Use Jos's idea and make your own custom message box. It's consisting from an image with text and title. Making it a modal or modeless isn't difficult at all. Don't forget optional arguments... ';]Edit: Bad me lol, it's not an overall volume ... "think before posting"... Edited February 20, 2009 by Authenticity Link to comment Share on other sites More sharing options...
muncherw Posted February 20, 2009 Author Share Posted February 20, 2009 But you're blocking the overall volume for someone listening to music maybe? Use Jos's idea and make your own custom message box. It's consisting from an image with text and title. Making it a modal or modeless isn't difficult at all. Don't forget optional arguments... ';]Mine only turns off the Default Beep noise. You can still play music and still get all other system sounds. It works well. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
FireFox Posted February 20, 2009 Share Posted February 20, 2009 @muncherw Its better to replace the good path according to the sound because it can change if youve installed packs or something else.. $sndpath = RegRead('HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current', '') RegWrite('HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current', '', 'REG_EXPAND_SZ', '') MsgBox(0, 'Quiet', 'You can't hear this') RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", '', 'REG_EXPAND_SZ', $sndpath) Cheees, FireFox. Link to comment Share on other sites More sharing options...
muncherw Posted February 20, 2009 Author Share Posted February 20, 2009 @muncherwIts better to replace the good path according to the sound because it can change if youve installed packs or something else..Good call, thanks. I'll change that. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] 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