Global $hGui = GUICreate('test', -1, -1, -1, -1, BitOR(0xCA0000, 0x10000))
GUISetState(@SW_MAXIMIZE)
Global $aPos0 = MouseGetPos(), $_timer = 0
AdlibRegister('_ck')
Do
Until GUIGetMsg() = -3
If $_timer Then MsgBox(0, '距离开始总时长', Round(TimerDiff($_timer) / 1000) & ' (秒)')
Func _ck()
If Not WinActive($hGui) Then Return
Local $aPosNow = MouseGetPos()
If $aPosNow[0] <> $aPos0[0] Or $aPosNow[1] <> $aPos0[1] Then
AdlibUnRegister()
$_timer = TimerInit()
ToolTip('开始计时')
EndIf
EndFunc ;==>_ck