你在adlib内循环做什么?
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 275, 93, 192, 114)
$Label1 = GUICtrlCreateLabel("整分字体变红", 48, 32, 164, 17)
AdlibRegister("_time", 1000) ;======> 现在时刻
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $IsSetColor = False
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _time()
If @MIN = 0 And @SEC < 5 Then ;正点5秒内字体变红
GUICtrlSetColor($Label1, 0xff0000)
$IsSetColor = Not $IsSetColor
Else
If $IsSetColor Then
GUICtrlSetColor($Label1, 0x000000)
$IsSetColor = Not $IsSetColor
EndIf
EndIf
EndFunc ;==>_time
|