Jump to content

Recommended Posts

Posted

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]
Posted

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]
Posted (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 by Authenticity
Posted

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]
Posted

@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.

Posted

@muncherw

Its 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]

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...