#NoTrayIcon #include <GUIConstants.au3> HotKeySet("{HOME}","start") HotKeySet("{END}","stop") Global $TimerCall, $elapse = 1000 ;интервал времени в милисекундах Global $TimerProcHandle = DllCallbackRegister("_TimerProc", "none", "hwnd;int;int;dword") $Form1 = GUICreate("Click", 143, 94, 193, 125) $Input1 = GUICtrlCreateInput("", 8, 8, 65, 21) $Button1 = GUICtrlCreateButton("START", 80, 8, 51, 49, 0) $Label1 = GUICtrlCreateLabel("start: 'Home' stop: 'End'", 8, 64, 124, 17) $Input2 = GUICtrlCreateInput("0", 8, 32, 41, 21) $Updown1 = GUICtrlCreateUpdown($Input2) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd DllCallbackFree($TimerProcHandle) DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "int", $TimerCall) Func start() $TimerCall = DllCall("user32.dll", "int", "SetTimer", "hwnd", 0, "int", 0, "int", $elapse, _ "ptr", DllCallbackGetPtr($TimerProcHandle)) $TimerCall = $TimerCall[0] EndFunc Func stop() DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "int", $TimerCall) EndFunc Func _TimerProc($hWnd, $Msg, $IdTimer, $dwTime) ;Здесь будет эмулироваться нажатия кнопок мыши с интервалом в 1 секунду. ConsoleWrite("---> Mouse click" & @LF) EndFunc |