参考我这个例子
#include <GuiConstants.au3>
GUICreate("", 600, 300)
$Label = GUICtrlCreateLabel("10秒后自动退出!", 15, 30)
;$N=
GUISetState() ;显示GUICreate ("",250,60)窗体
$begin = TimerInit()
$dif = TimerDiff($begin)
GUICtrlSetData($Label, $dif)
While 1
$dif = TimerDiff($begin)
$b = Int($dif)
$c = StringFormat("%05d\n", $b)
$d = StringMid($c, 2, 1)
GUICtrlSetData($Label, 10-$d)
If Int($dif) >= 10000 Then Exit
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd |