1. 3#那意思就是 循环+判断
2. controlclick 可以后台
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 200, 130, 192, 114)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Button1 = GUICtrlCreateButton("Button1", 64, 48, 75, 25, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
If Not WinActive($Form1) Then
Button1Click()
EndIf
Sleep(1000)
WEnd
Func Button1Click()
MsgBox(262144, "", "点我干嘛")
EndFunc ;==>Button1Click
Func Form1Close()
Exit
EndFunc ;==>Form1Close
[ 本帖最后由 sxd 于 2009-1-14 19:05 编辑 ] |