#include <GUIConstants.au3>
GUICreate("延迟时间", 300, 170)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("时间延迟:", 35,65)
$wait1=GUICtrlCreateInput("3",150,60,38,20)
GUICtrlCreateLabel("小时", 190,65)
$okbutton=GUICtrlCreateButton("OK", 120, 120, 60)
$Label = GUICtrlCreateLabel('核弹爆炸倒计时:____秒', 65,90,200,20)
Local $bg = 0, $C = 0
While 1
$Msg=GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
Case $okbutton
$w=GUICtrlRead($wait1)*60*60
$T1 = TimerInit()
$bg = 1
EndSwitch
If $bg = 1 Then
$T2 = Int(TimerDiff($T1) / 1000)
If $T2 >= $w Then ExitLoop
If $T2 > $C Then
$C = $T2
GUICtrlSetData($Label , '核弹爆炸倒计时: ' & $w - $T2 & ' 秒')
EndIf
EndIf
WEnd
|