|
楼主 |
发表于 2008-10-21 15:50:35
|
显示全部楼层
顶下
#include <GUIConstants.au3>
GUICreate("延迟时间", 300, 250)
GUICtrlCreateGroup ("",20,20,260,90)
GUICtrlCreateCheckbox("第一次", 15, 60, 65, 20)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("时间延迟:", 65,45)
$wait1=GUICtrlCreateInput("0.001",150,40,38,20)
GUICtrlCreateLabel("小时", 195,45)
$Label = GUICtrlCreateLabel('核弹爆炸倒计时:____秒', 65,80,200,20)
GUICtrlCreateGroup ("",20,120,260,90)
GUICtrlCreateCheckbox("第二次", 15, 160, 65, 20)
GUICtrlCreateLabel("时间延迟:", 65,145)
$wait2=GUICtrlCreateInput("0.002",150,140,38,20)
GUICtrlCreateLabel("小时", 195,145)
$Labe2 = GUICtrlCreateLabel('核弹爆炸倒计时:____秒', 65,180,200,20)
$okbutton=GUICtrlCreateButton("OK", 120, 220, 60)
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
Local $bg2 = 0, $C2 = 0
While 2
$Msg2=GUIGetMsg()
Switch $Msg2
Case $GUI_EVENT_CLOSE
Exit
Case $okbutton
$w2=GUICtrlRead($wait2)*60*60
$T3 = TimerInit()
$bg = 1
EndSwitch
If $bg = 1 Then
$T4 = Int(TimerDiff($T3) / 1000)
If $T4 >= $w2 Then ExitLoop
If $T4 > $C2 Then
$C = $T4
GUICtrlSetData($Label , '核弹爆炸倒计时: ' & $w2 - $T4 & ' 秒')
EndIf
EndIf
WEnd
有哪位大侠帮忙下,或给个类似的学习下,需选一个或两个爆炸,再运行,每次倒计时结束后休息系统时间,如选两个,第一个运行完了再运行第二个 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|