Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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:

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
×
×
  • Create New...