Jump to content
Sign in to follow this  
mstrchief138

GUI noises

Recommended Posts

mstrchief138

hi im new to AutoIt and i'm trying to write a fairly simple game.

the game is on a GUI thats fullscreen, and uses the _IsPressed () function to get input

the problem is that when you press the keys everything works just fine but you get the error noise (the one when ur on a GUI and you type something in when the control i not Edit or Input)

is there any way to get rid of the noise?

thank you

Share this post


Link to post
Share on other sites
GMK

Assuming this is the sound you're trying to "turn off," perhaps something like this would work (untested):

$Ding = RegRead("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "") ;Get default sound to write later
RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "", "REG_EXPAND_SZ", "") ;Remove default sound
;Insert game code here
RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "", "REG_EXPAND_SZ", $Ding) ;Set default sound back to its original value

Share this post


Link to post
Share on other sites
mstrchief138

Assuming this is the sound you're trying to "turn off," perhaps something like this would work (untested):

$Ding = RegRead("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "") ;Get default sound to write later
RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "", "REG_EXPAND_SZ", "") ;Remove default sound
;Insert game code here
RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", "", "REG_EXPAND_SZ", $Ding) ;Set default sound back to its original value
yes it works!

thank you :whistle:

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.