回复 1# sanfer8889 #Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, -1,-1)
$button1 = GUICtrlCreateButton("Test",50,50)
$button2 = GUICtrlCreateButton("move",280,280)
$hbutton2 = GUICtrlGetHandle(-1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $button1
Local $apos = WinGetPos($hbutton2);<=======================这个
MouseMove($apos[0] + 5,$apos[1] + 5)
Sleep(100)
MouseClick("left")
Case $button2
MsgBox(0,"","被自动点击的按钮!")
EndSwitch
WEnd
|