Dtvscrotes Posted October 8, 2007 Share Posted October 8, 2007 (edited) i want autoit to do something if i press a keycombo or just a key. I cant figure out hotkeyset. $click= ("{alt}+{d}") If $click _ispressed then msgbox(0,"title","you pressed alt d ") i want to do something like that Edited October 8, 2007 by Dtvscrotes Link to comment Share on other sites More sharing options...
FitzChivalry Posted October 8, 2007 Share Posted October 8, 2007 try using HotKeySet("{!d}", "click") func click() msgbox(0,"title","you pressed alt d ") endfunc Link to comment Share on other sites More sharing options...
wolf9228 Posted October 8, 2007 Share Posted October 8, 2007 (edited) i want autoit to do something if i press a keycombo or just a key. I cant figure out hotkeyset. $click= ("{alt}+{d}") If $click _ispressed then msgbox(0,"title","you pressed alt d ") i want to do something like that $dll = DllOpen("user32.dll") ; alt = 12 ;d = 44 $i = 0 While 1 if _IsPressed(12) and _IsPressed(44) then msgbox(0,"title","you pressed alt d ") EndIf wend 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 October 8, 2007 by wolf9228 صرح السماء كان هنا 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