Search the Community
Showing results for tags '_ispressed'.
-
I am trying to record a ClipGet after Ctrl + C Is stroke. Not working. It is possible ? While (1) $msg = GUIGetMsg () Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch Local $hDLL = DllOpen("user32.dll") If _IsPressed ("A2",$hDLL) And _IsPressed ("56",$hDLL) Then Sleep (500) $ClipBoard = ClipGet () ;~ ==========================================Console============================================ _GUICtrlListView_AddItem($ConsoleArea,""&$ClipBoard) _GUICtrlListView_EnsureVisible($ConsoleArea, _GUICtrlListView_GetItemCount($ConsoleArea)-1) ;~ =========================================/Console============================================ EndIf DllClose ($hDLL) WEnd
-
Hi guys, I'm learning about GUI's, I'm trying the below code, the idea being if I press the letter "e" while I have the GUI open I want the label color to change to green (I'm using a UDF for label colors). But every time I press "e" on my keyboard I just get a "ding" sound from my speakers and nothing changes with the label. I've looked at using something like "While GUIGetMsg() <> $GUI_EVENT_CLOSE" as I've seen it in other code instead of "While 1", but I don't think it's relevant. #include <GUIConstantsEx.au3>; for GUI... #include <GUIRichLabel.au3>; UDF for rich text label fonts #include <Misc.au3>; for _IsPressed $myLetter = "e" $hGUI = GUICreate("test", 700, 60) $lbl2 = _GUICtrlRichLabel_Create($hGUI, '<font color="purple">' & $myLetter & '</font>', 10, 10); , 260, 25 GUISetState(@SW_SHOW) Local $hDLL = DllOpen("user32.dll") While 1 if _IsPressed(Hex($myLetter), $hDLL) Then While _IsPressed(Hex($myLetter), $hDLL) Sleep(250) WEnd _GUICtrlRichLabel_SetData($lbl2, '<font color="green">' & $myLetter & '</font>') Sleep(2000) DllClose($hDLL) Exit EndIf Sleep(50) WEnd DllClose($hDLL) I am using an array of letters that I'm wanting to do this for, but as I can't get it to work I've stripped it down to the simplest code I can think of to try and get this working first. Appreciate any help. Thanks!
- 16 replies
-
- _ispressed
- pressed
-
(and 3 more)
Tagged with:
-
Hello to all, I've written a script using following part is inserted. Func _CallFolder() ; .... Local $_hDLL = DllOpen("user32.dll") ; .... ; .... While 1 ; .... ; .... If _IsPressed("1b",$_hDLL) then _Terminate($_hDll,$_iPID,$_hGUI) Sleep(10) WEnd ; .... ; .... EndFunc Func _Terminate($_para1, $_para2, $_para3) DllClose($_para1) ProcessClose($_para2) GUIDelete($_para3) Exit EndFunc The script is working right. But on typing "ESC" not only my script is closing all other open programs using "ESC" for termination too going closed. I've no idea why that happens. Maybe one of the "profis" can help me on it. Please ecxuse my bad English but I'm a German trying his best. Thank you and best regards, HalleMike
-
I want to create a loop which loops a code until for example f2 is pressed. So I tried something with _IsPressed but it doesn't work. Local $test = WinActivate("Notepad") Do Send("hi") Until _IsPressed("72", $test) I don't know how I can do nothing when pressing f2 because it says "error: _IsPressed(): undefined function.". I did put Send("hi") after Local $test = but it gives the same error. Does anyone know how to solve this problem? Maybe I am wrong and I need to use a whole other Function.. I am new to AutoIT so I am sorry..
- 16 replies
-
- _ispressed
- autoit
-
(and 2 more)
Tagged with:
-
Hello guys. how are u doing today ?? Im new here but i wanted show somethink i just did. best kind of dynamic way to set hotkeys in yours own program. i need any suggestions, bugs report or any way to improve or any way i can do it better. its first my own "example" so be easy for me. Thank u for your attention !!! #include <Misc.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> $GUI = GUICreate("set hotkeys", -1,-1) GUISetState() $button_hotkey = GUICtrlCreateButton("", 80, 30, 150, 25) $button_empty = GUICtrlCreateButton("", -1 ,-1) GUICtrlSetState ($button_empty, $GUI_HIDE) Local $hDLL = DllOpen("user32.dll") $start = False $CTRL = False $SHIFT = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "" Global $klawisz_shift_autoit, $klawisz_ctrl_autoit, $klawisz_alt_autoit, $klawisz, $klawisz_autoit While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $button_hotkey GUICtrlSetState($button_empty, $GUI_FOCUS) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit) $start = True $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUISetState(@SW_DISABLE, $GUI) $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "" $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "" $klawisz_autoit = "" $klawisz = "" GUICtrlSetData($button_hotkey, "Press Hot Key") pobierz_hotkey() EndSwitch WEnd Func pobierz_hotkey() While $start = True If $start = True And _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) And $SHIFT = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "" $klawisz_alt = "" $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "" $SHIFT = True $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT" $klawisz_ctrl = "" $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) $start = False EndIf ; SHIFT If $start = True And Not _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) And $CTRL = False Then $klawisz_shift = "" $klawisz_ctrl = "CTRL + " $klawisz_alt = "" $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "" $SHIFT = False $CTRL = True $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $CTRL = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "" $klawisz_ctrl = "CTRL" $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; CTRL If $start = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $ALT = False Then $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "ALT + " $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = True $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $ALT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; ALT If $start = True And _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) And $SHIFTCTRL = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL + " $klawisz_alt = "" $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = True $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFTCTRL = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL" $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; SHIFT CTRL If $start = True And _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $SHIFTALT = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "" $klawisz_alt = "ALT + " $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = True $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFTCTRL = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "" $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;SHIFT ALT If $start = True And Not _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $CTRLALT = False Then $klawisz_shift = "" $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT + " $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = True $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $CTRLALT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "" $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; CTRL ALT If $start = True And _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $SHIFTCTRLALT = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT + " $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = True GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFTCTRLALT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; SHIFT CTRL ALT ;/////// /////// /////// /////// /////// /////// /////// /////// /////// If $start = True And _IsPressed('08', $hDLL) Then $klawisz = "BACKSPACE" $klawisz_autoit = "{BACKSPACE}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('09', $hDLL) Then $klawisz = "TAB" $klawisz_autoit = "{TAB}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('0D', $hDLL) Then $klawisz = "ENTER" $klawisz_autoit = "{ENTER}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('13', $hDLL) Then $klawisz = "PAUSE" $klawisz_autoit = "{PAUSE}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('14', $hDLL) Then $klawisz = "CAPSLOCK" $klawisz_autoit = "{CAPSLOCK}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('1B', $hDLL) Then $klawisz = "ESC" $klawisz_autoit = "{ESC}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('20', $hDLL) Then $start = False $klawisz = "SPACEBAR" $klawisz_autoit = "{SPACE}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('21', $hDLL) Then $klawisz = "PAGE UP" $klawisz_autoit = "{PGUP}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('22', $hDLL) Then $klawisz = "PAGE DOWN" $klawisz_autoit = "{PGDN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('23', $hDLL) Then $klawisz = "END" $klawisz_autoit = "{END}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('24', $hDLL) Then $klawisz = "HOME" $klawisz_autoit = "{HOME}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('25', $hDLL) Then $klawisz = "LEFT ARROW" $klawisz_autoit = "{LEFT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('26', $hDLL) Then $klawisz = "UP ARROW " $klawisz_autoit = "{UP}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('27', $hDLL) Then $klawisz = "RIGHT ARROW" $klawisz_autoit = "{RIGHT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('28', $hDLL) Then $klawisz = "DOWN ARROW" $klawisz_autoit = "{DOWN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;~ If $start = True And _IsPressed('29', $hDLL) Then ;~ $klawisz = "SELECT" ;~ $klawisz_autoit = "???" ;~ GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) ;~ GUISetState(@SW_ENABLE) ;~ HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") ;~ $start = False ;~ EndIf If $start = True And _IsPressed('2A', $hDLL) Then $klawisz = "PRINT" $klawisz_autoit = "{PRINTSCREEN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;~ If $start = True And _IsPressed('2B', $hDLL) Then ;~ $klawisz = "EXECUTE" ;~ $klawisz_autoit = "???" ;~ GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) ;~ GUISetState(@SW_ENABLE) ;~ HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") ;~ $start = False ;~ EndIf If $start = True And _IsPressed('2C', $hDLL) Then $klawisz = "PRINT SCREEN" $klawisz_autoit = "{PRINTSCREEN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('2D', $hDLL) Then $klawisz = "INS" $klawisz_autoit = "{INS}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('2E', $hDLL) Then $klawisz = "DEL" $klawisz_autoit = "{DEL}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('30', $hDLL) Then $klawisz = "0" $klawisz_autoit = "0" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('31', $hDLL) Then $klawisz = "1" $klawisz_autoit = "1" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('32', $hDLL) Then $klawisz = "2" $klawisz_autoit = "2" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('33', $hDLL) Then $klawisz = "3" $klawisz_autoit = "3" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('34', $hDLL) Then $klawisz = "4" $klawisz_autoit = "4" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('35', $hDLL) Then $klawisz = "5" $klawisz_autoit = "5" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('36', $hDLL) Then $klawisz = "6" $klawisz_autoit = "6" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('37', $hDLL) Then $klawisz = "7" $klawisz_autoit = "7" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('38', $hDLL) Then $klawisz = "8" $klawisz_autoit = "8" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('39', $hDLL) Then $klawisz = "9" $klawisz_autoit = "9" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('41', $hDLL) Then $klawisz = "a" $klawisz_autoit = "a" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('42', $hDLL) Then $klawisz = "b" $klawisz_autoit = "b" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('43', $hDLL) Then $klawisz = "c" $klawisz_autoit = "c" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('44', $hDLL) Then $klawisz = "d" $klawisz_autoit = "d" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('45', $hDLL) Then $klawisz = "e" $klawisz_autoit = "e" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('46', $hDLL) Then $klawisz = "f" $klawisz_autoit = "f" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('47', $hDLL) Then $klawisz = "g" $klawisz_autoit = "g" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('48', $hDLL) Then $klawisz = "h" $klawisz_autoit = "h" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('49', $hDLL) Then $klawisz = "i" $klawisz_autoit = "i" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4A', $hDLL) Then $klawisz = "j" $klawisz_autoit = "j" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4B', $hDLL) Then $klawisz = "k" $klawisz_autoit = "k" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4C', $hDLL) Then $klawisz = "l" $klawisz_autoit = "l" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4D', $hDLL) Then $klawisz = "m" $klawisz_autoit = "m" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4E', $hDLL) Then $klawisz = "n" $klawisz_autoit = "n" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4F', $hDLL) Then $klawisz = "o" $klawisz_autoit = "o" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('50', $hDLL) Then $klawisz = "p" $klawisz_autoit = "p" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('51', $hDLL) Then $klawisz = "q" $klawisz_autoit = "q" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('52', $hDLL) Then $klawisz = "r" $klawisz_autoit = "r" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('53', $hDLL) Then $klawisz = "s" $klawisz_autoit = "s" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('54', $hDLL) Then $klawisz = "t" $klawisz_autoit = "t" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('55', $hDLL) Then $klawisz = "u" $klawisz_autoit = "u" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('56', $hDLL) Then $klawisz = "v" $klawisz_autoit = "v" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('57', $hDLL) Then $klawisz = "w" $klawisz_autoit = "w" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('58', $hDLL) Then $klawisz = "x" $klawisz_autoit = "x" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('59', $hDLL) Then $klawisz = "y" $klawisz_autoit = "y" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('5A', $hDLL) Then $klawisz = "z" $klawisz_autoit = "z" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('60', $hDLL) Then $klawisz = "KP 0" $klawisz_autoit = "{NUMPAD0}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('61', $hDLL) Then $klawisz = "KP 1" $klawisz_autoit = "{NUMPAD1}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('62', $hDLL) Then $klawisz = "KP 2" $klawisz_autoit = "{NUMPAD2}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('63', $hDLL) Then $klawisz = "KP 3" $klawisz_autoit = "{NUMPAD3}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('64', $hDLL) Then $klawisz = "KP 4" $klawisz_autoit = "{NUMPAD4}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('65', $hDLL) Then $klawisz = "KP 5" $klawisz_autoit = "{NUMPAD5}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('66', $hDLL) Then $klawisz = "KP 6" $klawisz_autoit = "{NUMPAD6}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('67', $hDLL) Then $klawisz = "KP 7" $klawisz_autoit = "{NUMPAD7}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('68', $hDLL) Then $klawisz = "KP 8" $klawisz_autoit = "{NUMPAD8}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('69', $hDLL) Then $klawisz = "KP 9" $klawisz_autoit = "{NUMPAD9}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6A', $hDLL) Then $klawisz = "KP Multiply" $klawisz_autoit = "{NUMPADMULT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6B', $hDLL) Then $klawisz = "KP Add" $klawisz_autoit = "{NUMPADADD}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6C', $hDLL) Then $klawisz = "Separator" $klawisz_autoit = "??" ;///////////////////////// GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6D', $hDLL) Then $klawisz = "KP Subtract" $klawisz_autoit = "{NUMPADSUB}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6E', $hDLL) Then $klawisz = "KP dot" $klawisz_autoit = "{NUMPADDOT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6F', $hDLL) Then $klawisz = "KP slash" $klawisz_autoit = "{NUMPADDIV}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('70', $hDLL) Then $klawisz = "F1" $klawisz_autoit = "{F1}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('71', $hDLL) Then $klawisz = "F2" $klawisz_autoit = "{F2}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('72', $hDLL) Then $klawisz = "F3" $klawisz_autoit = "{F3}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('73', $hDLL) Then $klawisz = "F4" $klawisz_autoit = "{F4}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('74', $hDLL) Then $klawisz = "F5" $klawisz_autoit = "{F5}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('75', $hDLL) Then $klawisz = "F6" $klawisz_autoit = "{F6}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('76', $hDLL) Then $klawisz = "F7" $klawisz_autoit = "{F7}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('77', $hDLL) Then $klawisz = "F8" $klawisz_autoit = "{F8}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('78', $hDLL) Then $klawisz = "F9" $klawisz_autoit = "{F9}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('79', $hDLL) Then $klawisz = "F10" $klawisz_autoit = "{F10}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('7A', $hDLL) Then $klawisz = "F11" $klawisz_autoit = "{F11}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('7B', $hDLL) Then $klawisz = "F12" $klawisz_autoit = "{F12}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('90', $hDLL) Then $klawisz = "NUM LOCK" $klawisz_autoit = "{NUMLOCK}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('91', $hDLL) Then $klawisz = "SCROLL LOCK" $klawisz_autoit = "{SCROLLLOCK}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;~ If $start = True And _IsPressed('A5', $hDLL) Then ;~ $klawisz = "Right MENU " ;~ $klawisz_autoit = "{RWIN}" ;~ GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) ;~ GUISetState(@SW_ENABLE) ;~ HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") ;~ $start = False ;~ EndIf If $start = True And _IsPressed('BA', $hDLL) Then $klawisz = ";" $klawisz_autoit = ";" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BB', $hDLL) Then $klawisz = "=" $klawisz_autoit = "=" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BC', $hDLL) Then $klawisz = "," $klawisz_autoit = "," GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BD', $hDLL) Then $klawisz = "-" $klawisz_autoit = "-" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BE', $hDLL) Then $klawisz = "." $klawisz_autoit = "." GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BF', $hDLL) Then $klawisz = "/" $klawisz_autoit = "/" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('C0', $hDLL) Then $klawisz = "`" $klawisz_autoit = "`" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('DB', $hDLL) Then $klawisz = "[" $klawisz_autoit = "[" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('DC', $hDLL) Then $klawisz = "\" $klawisz_autoit = "\" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('DD', $hDLL) Then $klawisz = "]" $klawisz_autoit = "]" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf WEnd EndFunc Func _beep() Beep(500,200) EndFunc ;==>_quit just one thing i dont discover yet is how disable quit program by press ESC while $button_hotkey is already pressed
-
Greetings people of the AutoIt community! I think I have discovered some possible wrong verbiage in the HelpFile. I'm trying to make my software detect the _IsPressed("KEY") for the RIGHT MENU button on the keyboard. You all have a RIGHT MENU button on your keyboard (maybe you haven't noticed it), it's they key between the Right ALT key and the Right CTRL Key. However!!!!!!! In the helpfile it says the RIGHT MENU key is "A5", that is not true for me. A5 is actually the Right ALT key. So my question is, what is the _IsPressed HexKey for the RIGHT MENU button? #include <Misc.au3> #include <MsgBoxConstants.au3> Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("A5", $hDLL) Then Sleep(100) msgbox(0,"Test", "Pressed!") Sleep(250) EndIf WEnd DllClose($hDLL) If you try to run the above code, the msgbox will only appear if you press the Right ALT key, even though the helpfil says that A5 is the Right Menu Key hex. Thank you, Brian
- 8 replies
-
- _ispressed
- menu
-
(and 3 more)
Tagged with:
-
I need to know how to get delays let's say for example 4 mouse clicks then get the total delay What i have tried: While 1 If _IsPressed ("01") = 1 Then $timer = TimerInit () Sleep (100) While _IsPressed ("01") Sleep (50) WEnd $timer2 = TimerInit () While _IsPressed ("01") Sleep (50) Wend $timer3 = TimerInit () While _IsPressed ("01") Sleep (50) WEnd $timer4 = TimerInit () $diff = TimerDiff ($timer + $timer2 + $timer3 + $timer4) MsgBox ($MB_TOPMOST, "", "Difference in milliseconds: " & @CRLF & $diff) EndIf WEndand While 1 If _IsPressed ("01") = 1 Then $timer = TimerInit () Sleep (100) Do Sleep (50) Until _IsPressed ("01") $timer2 = TimerInit () Do Sleep (50) Until _IsPressed ("01") $timer3 = TimerInit () Do Sleep (50) Until _IsPressed ("01") $timer4 = TimerInit () Do Sleep (50) Until _IsPressed ("01") $timer5 = TimerInit () $diff = TimerDiff ($timer + $timer2 + $timer3 + $timer4 + $timer5) MsgBox ($MB_TOPMOST, "", "Difference in milliseconds: " & @CRLF & $diff) EndIf WEnd No luck msg box just shows at first click.
-
I know there is a simple way to do this, but I can't remember and can't find the proper way.. I just need to set a hotkey that is only active while the GUI is up. When the GUI is minimized or no longer in focus, I need it to release the bound key. I have the enter key bound for barcode scanning and when the app is minimized, it holds on to the enter key. I know there is a simple way to fix this, but I don't recall how.. I cant post the app because its massive and wont start if you try to use it outside our environment. Here is my little test script.. Any ideas are greatly appreciated! #include <Misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Form1", 318, 118, 192, 124) GUISetState(@SW_SHOW) HotKeySet("{ENTER}", "HotKeyPressed") Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("12", $hDLL) Then _IsKeyPressed() $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func HotKeyPressed() TrayTip("HotKey", "I see the Enter key using the HotKeySet function.", 10, 1) EndFunc ;==>HotKeyPressed Func _IsKeyPressed() TrayTip("_IsKeyPressed", "I see the Alt button using the _IsKeyPressed function.", 10, 1) EndFunc ;==>_IsKeyPressed
-
Let's say I'm in a browser and the exta Left side button (_IsPressed "05") on my mouse is configured to move back to the previous web page... But I would also like to use this button to modify the behavior of an AutoIt script I may be running with the browser active, but in that case I don't want the default behavior to happen; my page has to stay put. I think I cannot temporarily use BlockInput here, cause I may have a dialog window opening in which I must allow user input. In javascript (or jQuery) they use e.preventDefault(); (ore return false;) for this stuff. Can AutoIt do it too? TIA!
-
Hey im looking to rebind my wasd keys to arrow keys in order to play a game using my phone and chrom remote access. I tried using controlsend to send a arrow keys when i push wasd. Problem lies in that it sends both w (for example) and the up arrow key aswell as asd etc. Any ideas how to get around this?
- 6 replies
-
- keystroke
- _ispressed
-
(and 3 more)
Tagged with:
-
Hi all, I want use more than one key in HotKeySet or _IsPressed functions. This is my code. It is working. But i would like to know if there is any better way to do this. Local $flag1 = False Local $flag2 = False While 1 Sleep(10) if _IsPressed("4D") Then $flag1 = True If _IsPressed("44") Then $flag2 = True if $flag1 = True And $flag2 = True And _IsPressed("41") Then TestSend() WEnd Func TestSend() Send("{BS 3}My Dear Alan{TAB}:{SPACE}") EndFunc ;==>WordSendKeyALT_W
-
IsPressed_UDF is based on original _IsPressed function. Description : -This udf can detect if some keys are pressed by user on keyboard or mouse. -IsPressed functions extend possibility to choice keys to check. -Keys are specified in functions by their hexadecimal number, ['0D' = 'ENTER'] you can also translate hexadecimal key to alpha key (see functions and examples) Update : [Latest: 12 Jun 2013] Functions : Exemples : IsPressed_UDF 2.3 : IsPressed_UDF.au3 IsPressed_UDF 2.2 : IsPressed_UDF.au3 Add IsPressed_UDF functions to SciTE : IsPressed_Function Enjoy !
- 104 replies
-
- _ispressed
- key
-
(and 2 more)
Tagged with:
-
Hi, this searches only for CTRL but ALT, also activates it, if i change the number to 12 (ALT) it works, and CTRL doesn't activate it! So this means there is a problem, when i use ispressed 11. Can anyone verify this? ;ALT = 12 ;CTRL = 11 #include $dll = DllOpen("user32.dll") Do Sleep(50) If _IsPressed("11", $dll) Then TrayTip('Info', 'Key Pressed', 1) Sleep(1000) TrayTip('','',1) EndIf Until $dll = 123 DllClose($dll)
-
Hello everyone, I have been working on a script, which makes a circle in the window (a ball perhaps), which allows me to change its position using keyboard. Here's it: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #include <WinAPI.au3> Global $g = 10, $Label2, $CONTROLPOS[2] $CONTROLPOS[0] = 20 $CONTROLPOS[1] = 20 Global $USER32DLL = DllOpen('user32.dll') $DEFAULTVELOCITY = 5 _GDIPlus_StartUp() $Form1 = GUICreate("My Problem", 934, 627, 332, 130) GUISetBkColor(0xffffff) $Label2 = GUICtrlCreateLabel("", 20, 20, 33, 33) $hGraphicLabel = _GDIPlus_GraphicsCreateFromHWND(GUICtrlGetHandle($Label2)) _GDIPlus_GraphicsDrawEllipse($hGraphicLabel, 0,0, 30, 30) _GDIPlus_GraphicsSetSmoothingMode($hGraphicLabel, 2) $hBMPBuff = _GDIPlus_BitmapCreateFromGraphics(33, 33, $hGraphicLabel) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBMPBuff) _GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2) _GDIPlus_GraphicsDrawEllipse($hGraphic, 0,0, 30, 30) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_PAINT, '_ReDraw') While 1 _Projectile() $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_GraphicsDispose($hGraphicLabel) _WinAPI_DeleteObject($hBMPBuff) _GDIPlus_ShutDown() DllClose($USER32DLL) Exit EndSwitch WEnd Func _Projectile() If _IsPressed('27', $USER32DLL) and $CONTROLPOS[0] < 934-33 then GUICtrlSetPos($Label2, $CONTROLPOS[0] + $DEFAULTVELOCITY) $CONTROLPOS[0] = $CONTROLPOS[0] + $DEFAULTVELOCITY _GDIPlus_GraphicsDrawImage($hGraphicLabel, $hBMPBuff, 0, 0) EndIf If _IsPressed('25', $USER32DLL) and $CONTROLPOS[0] >$DEFAULTVELOCITY then GUICtrlSetPos($Label2, $CONTROLPOS[0] - $DEFAULTVELOCITY) $CONTROLPOS[0] = $CONTROLPOS[0] - $DEFAULTVELOCITY _GDIPlus_GraphicsDrawImage($hGraphicLabel, $hBMPBuff, 0, 0) EndIf If _IsPressed('26', $USER32DLL) and $CONTROLPOS[1] >$DEFAULTVELOCITY then GUICtrlSetPos($Label2, $CONTROLPOS[0], $CONTROLPOS[1] - $DEFAULTVELOCITY) $CONTROLPOS[1] = $CONTROLPOS[1] - $DEFAULTVELOCITY _GDIPlus_GraphicsDrawImage($hGraphicLabel, $hBMPBuff, 0, 0) EndIf If _IsPressed('28', $USER32DLL) and $CONTROLPOS[1] < 627-26 then GUICtrlSetPos($Label2, $CONTROLPOS[0], $CONTROLPOS[1] + $DEFAULTVELOCITY) $CONTROLPOS[1] = $CONTROLPOS[1] + $DEFAULTVELOCITY _GDIPlus_GraphicsDrawImage($hGraphicLabel, $hBMPBuff, 0, 0) EndIf EndFunc Func _ReDraw() _GDIPlus_GraphicsDrawImage($hGraphicLabel, $hBMPBuff, 0, 0) EndFunc Now, as soon as you press an arrow key, the ball moves fine as expected, but if the mouse is moved, the ball moves super-duper fast (something, which is not acceptable in my case) >_< . Please help me resolve this issue. Thank you for your time... With regards, MKISH
-
Works with ctrl+left mouse click, displays a traytip, balloon-like with the image resolution, if can be read. Not entirely mine, got help from forum, without you i couldn't have done it. thanks ppl. #include "image_get_info.au3" #include <Misc.au3> AutoItSetOption("TrayAutoPause", 0) Local $DLL = DllOpen("user32.dll") Local $file, $aInfo, $keyR1, $keyR2 RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced", "EnableBalloonTips", "REG_DWORD", "1") While 1 Sleep(50) If _IsPressed("11", $dll) Then ;CTRL $keyR1 = 1 CTRLkey() ElseIf $keyR1 + $keyR2 = 2 Then RES() EndIf WEnd DllClose($dll) Func CTRLkey() If _IsPressed("01", $dll) Then ;LMB $keyR2 = 1 EndIf EndFunc ;==>CTRLkey Func RES() $keyR1 = 0 $keyR2 = 0 Send("^c") Sleep(50) $file = ClipGet() $aInfo = _ImageGetInfo($file) TrayTip("Resolution", _ImageGetParam($aInfo, "Width") & "x" & _ImageGetParam($aInfo, "Height"), 2, 1) EndFunc ;==>RES EDIT: Required UDF attached, had to change code as it wasn't working flawlessly as it should, now it's good, press ctrl and click on the image, once you release ctrl, the traytip will show the resolution of the image. Got to investigate why it wasn't working well the other way. image_get_info.au3 AutoIt Res.au3
- 2 replies
-
- _ispressed
- traytip
-
(and 2 more)
Tagged with:
-
Hi all, back again to AutoIt after a while... I have a minimal problem I need to solve. I'm building a tool that will run an application with just an "hotkeyset". But, since there is another application (geolocalization of water infrastructures) running that uses customizable shortcuts, I want to let user choose a personal key. So, brutally this is the idea (and it works perfectly) #include <GUIConstantsEx.au3> #include <HotKeyInput.au3> #include <Misc.au3> $dll = DllOpen("user32.dll") Global $Form, $HKI1, $HKI2, $Button, $Text Global $app = "Thermo" HotKeySet("^y", "_kill") $Form = GUICreate('Test', 300, 160) GUISetFont(8.5, 400, 0, 'Tahoma', $Form) $HKI1 = _GUICtrlHKI_Create(0, 56, 55, 230, 20) ; Lock CTRL-ALT-DEL for Hotkey Input control, but not for Windows _KeyLock(0x062E) GUICtrlCreateLabel('Hotkey1:', 10, 58, 44, 14) GUICtrlCreateLabel('Click on Input box and hold a combination of keys.' & @CR & 'Press OK to view the code.', 10, 10, 280, 28) $Button = GUICtrlCreateButton('OK', 110, 124, 80, 23) GUICtrlSetState(-1, BitOR($GUI_DEFBUTTON, $GUI_FOCUS)) GUISetState() $out = 0 While $out = 0 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button $out = 1 $KB = StringRight(Hex(_GUICtrlHKI_GetHotKey($HKI1)), 4) GUISetState(@SW_HIDE) EndSwitch WEnd While 1 If _IsPressed($KB, $dll) Then _launchAPP() WEnd DllClose($dll) Func _launchAPP() MsgBox(0,"Test OK","Test OK") _kill() ; just run the application EndFunc Func _kill() Exit 0 EndFunc ;==>_kill BUT this only works for regular keys, not combo (i.e. ALT-F6) Is there a way to let _ispressed() to understand combo ? Obviously all is about 2 lines: $KB = StringRight(Hex(_GUICtrlHKI_GetHotKey($HKI1)), 4)and _IsPressed($KB, $dll) if I use ,4 I get all the parameters but it seems _ispressed read only the last two digits Thanks, Marco
-
I am trying to do it with the following code. #include <Misc.au3> Do . . . While 1 If _IsPressed(02) Then TogglePause() Endif Wend until $count = 125 Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc The problem is that the addition of the code into the loop stops the loop. Now it executes only once. And I did not even press any key or mouse button.
-
how can i check if the quote key (') is pressed?
-
I'm trying to create a small script to press a few keys after two mouse clicks. Below is the script that I wrote. For some reason it does the Send command after only one click, then it waits until I click again. #Include <Misc.au3> ; required for _IsPressed $dll = DllOpen("user32.dll") Dim $x = 0 While 1 While $x < 2 If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then $x = $x + 1 EndIf WEnd Send("{UP 4}{ENTER}{ENTER}") $x = 0 WEnd This version works after one click, and gives me 1 1/2 seconds to make the second click before calling the Send command. But I'd prefer to get AutoIt to wait for the second click without using the Sleep function. Any ideas? While 1 While 1 If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then ExitLoop WEnd Sleep(1500) Send("{UP 4}{ENTER}{ENTER}") WEnd