sim Posted July 31, 2005 Share Posted July 31, 2005 (edited) hello i have littile problem hotkeyset is not working with Uppercase CHAR when i set Lowercase a it works but not with Uppercase any one have solution plz share it HotKeySet("A", "ShowMessage") While 1 Sleep(100) WEnd Func ShowMessage() MsgBox(4096,"","Uppercase A pressed") EndFunc Edited July 31, 2005 by sim Link to comment Share on other sites More sharing options...
GaryFrost Posted July 31, 2005 Share Posted July 31, 2005 Shift + A works, not caps lock and A SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
sim Posted July 31, 2005 Author Share Posted July 31, 2005 U MEAN we cannt use Simple A any other way to capture Uppercase CHAR When i press A must be show Message Link to comment Share on other sites More sharing options...
Somerset Posted July 31, 2005 Share Posted July 31, 2005 letters by them self can be used to makea key logger. so no it was taken out to prevent that. Link to comment Share on other sites More sharing options...
layer Posted July 31, 2005 Share Posted July 31, 2005 (edited) Ummm, beerman? In 3.1.1 you are allowed to use a single letter for a hotkey... Example:HotKeySet("e", "Hey") While 1 Sleep(2000) WEnd Func Hey() MsgBox(0, "Hey", "Hey") EndFunc...EDIT: And if you look, you didn't even pay attention to his question! Edited July 31, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
GaryFrost Posted July 31, 2005 Share Posted July 31, 2005 U MEAN we cannt use Simple A any other way to capture Uppercase CHAR When i press A must be show Message<{POST_SNAPBACK}>Didn't say you couldn't use it, it's just it works with Shift + a not Capslock + a SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
LxP Posted August 1, 2005 Share Posted August 1, 2005 Is there a way to check if Caps Lock is on (there probably is somewhere on the forums)? You could use that in your script to determine if a capital or lowercase A was pressed. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2005 Share Posted August 1, 2005 expandcollapse popup$KeyStates = _GetKeyState() If $KeyStates[1] Then MsgBox(0, "Key State", "Num Lock is On") If $KeyStates[2] Then MsgBox(0, "Key State", "Scroll Lock is On") If $KeyStates[3] Then MsgBox(0, "Key State", "Caps Lock is On") Func _GetKeyState() Const $VK_NUMLOCK = 0x90 Const $VK_SCROLL = 0x91 Const $VK_CAPITAL = 0x14 Local $ret, $a_keystate[4] $a_keystate[0] = 3 $ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_NUMLOCK) $a_keystate[1] = $ret[0] $ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_SCROLL) $a_keystate[2] = $ret[0] $ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_CAPITAL) $a_keystate[3] = $ret[0] Return $a_keystate EndFunc ;==>_GetKeyState If _GetNumLock() Then MsgBox(0, "Key State", "Num Lock is On") If _GetScrollLock() Then MsgBox(0, "Key State", "Scroll Lock is On") If _GetCaps() Then MsgBox(0, "Key State", "Caps Lock is On") Func _GetNumLock() Const $VK_NUMLOCK = 0x90 Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_NUMLOCK) Return $ret[0] EndFunc Func _GetScrollLock() Const $VK_SCROLL = 0x91 Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_SCROLL) Return $ret[0] EndFunc Func _GetCaps() Const $VK_CAPITAL = 0x14 Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_CAPITAL) Return $ret[0] EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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