改了一下#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $Paused
$Form1 = GUICreate("测试窗口", 232, 88, 192, 114)
$Button1 = GUICtrlCreateButton("测 试 按 钮", 56, 32, 113, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
HotKeySet("{F1}", "qidong");启动鼠标连点
HotKeySet("{End}", "zhanting");暂停鼠标连点
HotKeySet("{ESC}", "nExit");暂停鼠标连点
EndSwitch
WEnd
Func zhanting()
$Paused = True
TogglePause()
EndFunc
Func TogglePause()
While $Paused
Sleep(100)
ToolTip('暂停鼠标连点', 0, 0)
WEnd
EndFunc
Func qidong()
ToolTip("")
While 1
MouseClick("left")
WEnd
EndFunc
Func nExit()
Exit
EndFunc
|