#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Local $i = 1,$B = 1
Opt("GUIOnEventMode",1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("有鼠?效?的?候如何加循?段", 367, 147)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$Label1 = GUICtrlCreateLabel("", 48, 16, 60, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Button1", 48, 56, 115, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibRegister("xh",6000)
While 1
$Info = GUIGetCursorInfo($Form1)
If Not @error Then
If $info[4] = $Button1 And $B = 1 Then
MsgBox(0,0,'鼠?在按?上')
$B = 0
ElseIf $info[4] <> $Button1 And $B = 0 Then
;MsgBox(0,0,'鼠?已离?按?')
$B = 1
EndIf
EndIf
WEnd
Func _Exit()
Exit
EndFunc ;==>_Exit
Func xh()
GUICtrlSetData($Label1,$i)
$i+= 1
EndFunc
|