本帖最后由 laomeng 于 2013-9-3 09:32 编辑 #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $time = 70
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("提示", 350, 172, 193, 125)
$Label1 = GUICtrlCreateLabel("", 56, 52, 235, 48)
GUICtrlSetColor(-1,0x1B9327)
GUICtrlSetFont(-1, 18, 400, 0, "楷体_GB2312")
$Button1 = GUICtrlCreateButton("确定(&Y)", 53, 128, 73, 25, 0)
$Button2 = GUICtrlCreateButton("退出(&X)", 210, 128, 73, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibRegister ("_timer", 1000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE, $Button2
Exit
Case $Button1
ExitLoop
EndSwitch
If $time <= 0 Then ExitLoop
WEnd
Exit
Func _timer()
$time -= 1
If $time < 60 Then GUICtrlSetColor($Label1,0xDD2113)
GUICtrlSetData($Label1,"距离下次宝藏开启还剩" & $time & "秒")
If $time <= 0 Then AdlibUnRegister()
EndFunc ;==>_timer
例如166秒 如何 将 秒 显示为 X小时 X分 X 秒 |