bennyvo Posted May 5, 2005 Share Posted May 5, 2005 hi, i would like to have a script, that disable a specific (not all) key while another key is pressed. eg. if key A is pressed then disable key B end if thanks alot. Link to comment Share on other sites More sharing options...
quick_sliver007 Posted May 5, 2005 Share Posted May 5, 2005 (edited) hi,i would like to have a script, that disable a specific (not all) key while another key is pressed.eg.if key A is pressed thendisable key Bend ifthanks alot. <{POST_SNAPBACK}>This blockes the "b" key if the "a" key is used before the "b" key. The only thing is that it blockes the key until the script is closed. I hope this helps.While 1 Select Case _IsPressed(41); 41 is the hexkey for the letter "A" HotKeySet("b","_blockB"); If a key is set as a hotkey ;then the key only does the function it is set to. EndSelect WEnd Func _IsPressed($hexKey) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc Func _BlockB(); a funtion that does nothing, just used for the hotkey. EndFunc Edited May 5, 2005 by quick_sliver007 . Link to comment Share on other sites More sharing options...
bennyvo Posted May 7, 2005 Author Share Posted May 7, 2005 thanks for the reply, it work fine. 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