neotrio 0 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? Share this post Link to post Share on other sites
CWorks 0 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 Share this post Link to post Share on other sites
neotrio 0 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 Share this post Link to post Share on other sites