|
theoneofgod, if i wanted to make Ctrl + c to press F3, would this be the script?
While 1
If _IsPressed(11) Then ; if CTRL is pressed
If _IsPressed(43) Then ; if X is pressed
Send("{F3}")
EndIf
EndIf
Sleep(10)
WEnd
Func _IsPressed($sHexKey, $vDLL = '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($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
If @error Then Return SetError(@error, @extended, False)
Return BitAND($a_R[0], 0x8000) <> 0
EndFunc ;==>_IsPressed
If not, what am i doing wrong?
|