neotrio Posted August 24, 2006 Share Posted August 24, 2006 Hi All, I just found that " _IsPressed() " is missing from the file "Misc.au3" which is supposed to be included while using the function. any help? Link to comment Share on other sites More sharing options...
CWorks Posted August 24, 2006 Share Posted August 24, 2006 (edited) it's not missing from my v3.2.0.1 I just wrote a script that uses it and it works fine It's the last funtion in the file in fact here's a copy and paste ;=============================================================================== ; ; Description: _IsPressed ; Parameter(s): $s_hexKey - key to check for ; $v_dll = Handle to dll or default to user32.dll ; ; User CallTip: _IsPressed($s_hexKey[, $v_dll = 'user32.dll']) Check if key has been pressed. (required: <Misc.au3>) ; Return Value(s): 1 if true ; 0 if false ; Author(s): ezzetabi and Jon ; ;=============================================================================== Func _IsPressed($s_hexKey, $v_dll = 'user32.dll') ; $hexKey must be the value of one of the keys. ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is. Local $a_R = DllCall($v_dll, "int", "GetAsyncKeyState", "int", '0x' & $s_hexKey) If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1 Return 0 EndFunc ;==>_IsPressed Edited August 24, 2006 by CWorks Link to comment Share on other sites More sharing options...
neotrio Posted August 24, 2006 Author Share Posted August 24, 2006 it's not missing from my v3.2.0.1 I just wrote a script that uses it and it works fine It's the last funtion in the file in fact here's a copy and paste ;=============================================================================== ; ; Description: _IsPressed ; Parameter(s): $s_hexKey - key to check for ; $v_dll = Handle to dll or default to user32.dll ; ; User CallTip: _IsPressed($s_hexKey[, $v_dll = 'user32.dll']) Check if key has been pressed. (required: <Misc.au3>) ; Return Value(s): 1 if true ; 0 if false ; Author(s): ezzetabi and Jon ; ;=============================================================================== Func _IsPressed($s_hexKey, $v_dll = 'user32.dll') ; $hexKey must be the value of one of the keys. ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is. Local $a_R = DllCall($v_dll, "int", "GetAsyncKeyState", "int", '0x' & $s_hexKey) If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1 Return 0 EndFunc ;==>_IsPressed Thnx Buddy:D 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