多计时器如何数组方式加载 - 已解决
本帖最后由 rally 于 2022-11-11 18:35 编辑想做个多计时器多任务的监控画面,查找学习了论坛各位大佬的一些思路代码。奈何还没理清个思路来做。用Timer建多个计时,用数组的方式也没处理好,还是对Timer没有深层的理解。这里贴出两个思路方式,请大佬帮提携指点一下新手菜鸟,不胜感激
;这个是取自论坛的计时器多线程,改了下数组方式处理,就没有计时效果,不知道错在哪里.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $Button,$Timer,$TimerDLL,$Label
$Form1 = GUICreate("多线程实例", 272, 139, -1, -1)
For $i=1 to 3
$Button[$i] = GUICtrlCreateButton("开始", 168, 8+40*($i-1), 89, 25, 0)
$Label[$i]= GUICtrlCreateLabel("00:00:00", 8, 8+40*($i-1), 146, 17)
Next
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
If $msg= -3 Then
Exit
Else
For $i=1 to 3
If $msg = $Button[$i] Then
If GUICtrlRead($Button[$i]) =="开始" Then
$Timer1 = DllCallbackRegister("Timer", "int", "hwnd;uint;uint;dword")
$TimerDLL1 = DllCall("user32.dll", "uint", "SetTimer", "hwnd", 0, "uint", 0, "int", 1000, "ptr", DllCallbackGetPtr($Timer))
GUICtrlSetData($Button[$i],"关闭")
ExitLoop
Else
DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $TimerDLL)
DllCallbackFree($Timer1)
GUICtrlSetData($Button[$i],"开始")
ExitLoop
EndIf
EndIf
Next
EndIf
WEnd
Func Timer($hWnd, $uiMsg, $idEvent, $dwTime)
For $i=1 to 3
If $idEvent = $TimerDLL11[$i] Then
GUICtrlSetData($Label[$i], @HOUR & ":" & @MIN & ":" & @SEC)
ExitLoop
EndIf
Next
EndFunc
;下面这个是论坛的思路方式,对建立多个不确定数量的计时任务,不太适用,或者我没找到处理思路
$Form1 = GUICreate("多线程实例", 272, 139, -1, -1)
$Label1 = GUICtrlCreateLabel("00:00:00", 8, 8, 146, 17)
$Label2 = GUICtrlCreateLabel("00:00:00", 8, 56, 150, 17)
$Label3 = GUICtrlCreateLabel("00:00:00", 8, 104, 148, 17)
$Button1 = GUICtrlCreateButton("开始", 168, 8, 89, 25, 0)
$Button2 = GUICtrlCreateButton("开始", 168, 48, 89, 25, 0)
$Button3 = GUICtrlCreateButton("开始", 168, 96, 89, 25, 0)
GUISetState(@SW_SHOW)
Global $t2, $t3 = 1
While 1
Switch GUIGetMsg()
Case - 3
Exit
Case $Button1
If GUICtrlRead($Button1) =="开始" Then
$Timer = DllCallbackRegister("Timer", "int", "hwnd;uint;uint;dword")
$TimerDLL = DllCall("user32.dll", "uint", "SetTimer", "hwnd", 0, "uint", 0, "int", 1000, "ptr", DllCallbackGetPtr($Timer))
GUICtrlSetData($Button1,"关闭")
Else
GUICtrlSetData($Button1,"开始")
DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $TimerDLL)
DllCallbackFree($Timer)
EndIf
Case $Button2
If GUICtrlRead($Button2) =="开始" Then
$Timer2 = DllCallbackRegister("Timer", "int", "hwnd;uint;uint;dword")
$Timer2DLL = DllCall("user32.dll", "uint", "SetTimer", "hwnd", 0, "uint", 0, "int", 200, "ptr", DllCallbackGetPtr($Timer2))
GUICtrlSetData($Button2,"关闭")
Else
GUICtrlSetData($Button2,"开始")
DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $Timer2DLL)
DllCallbackFree($Timer2)
EndIf
Case $Button3
If GUICtrlRead($Button3) =="开始" Then
$Timer3 = DllCallbackRegister("Timer", "int", "hwnd;uint;uint;dword")
$Timer3DLL = DllCall("user32.dll", "uint", "SetTimer", "hwnd", 0, "uint", 0, "int", 500, "ptr", DllCallbackGetPtr($Timer3))
GUICtrlSetData($Button3,"关闭")
Else
GUICtrlSetData($Button3,"开始")
DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $Timer3DLL)
DllCallbackFree($Timer3)
EndIf
EndSwitch
WEnd
Func Timer($hWnd, $uiMsg, $idEvent, $dwTime)
If $idEvent = $TimerDLL Then
GUICtrlSetData($Label1, @HOUR & ":" & @MIN & ":" & @SEC)
ElseIf $idEvent = $Timer2DLL Then
GUICtrlSetData($Label2, @HOUR & ":" & @MIN & ":" & @SEC)
ElseIf $idEvent = $Timer3DLL Then
;~ $t3 *= 2
;~ GUICtrlSetData($Label3, $t3)
GUICtrlSetData($Label3, @HOUR & ":" & @MIN & ":" & @SEC)
EndIf
EndFunc
;这个是我想做的计时任务界面(不一定是10个任务,可以改数组数量增减) ,每个任务可以独立执行计时及停止 。下面只是实行单个的,多个就不行,没找打解决思路
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $label,$Button,$NO,$Customer,$SPEC,$Time,$Stime,$Dtime,$Status,$ACT
Global $str =
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 1050, 500, 223, 108)
Local $a=24,$b=24
$Group1 = GUICtrlCreateGroup("", $a, $b, 1000, 737)
GUICtrlSetFont(-1, 14, 800, 0, "思源黑体 CN Medium")
$Label = GUICtrlCreateLabel("",$a +20+ (1-1)*120,$b+50,80,30)
$Label = GUICtrlCreateLabel("",$a -15+ (2-1)*100,$b+50,80,30)
$Label = GUICtrlCreateLabel("",$a +10+ (3-1)*120,$b+50,80,30)
$Label = GUICtrlCreateLabel("",$a +40+ (4-1)*120,$b+50,80,30,0x00001)
$Label = GUICtrlCreateLabel("",$a +65+ (5-1)*120,$b+50,80,30)
$Label = GUICtrlCreateLabel("",$a +140+ (6-1)*120,$b+50,80,30)
$Label = GUICtrlCreateLabel("",$a +170+ (7-1)*120,$b+50,80,30)
For $i=1 to 7 step 1
GUICtrlSetData($Label[$i] ,$str[$i])
GUICtrlSetFont($Label[$i], 12, 800, 0, "宋体")
Next
$d=30
For $j=1 to 10 step 1
$NO[$j]= GUICtrlCreateLabel($j,$a +20,$b+50+$j*35,20,30)
$Customer[$j] = GUICtrlCreateInput("",$a + 10 +$d,$b+50+$j*35,130,30,0x00001)
$SPEC[$j] = GUICtrlCreateInput("",$a + 140+$d,$b+50+$j*35,220,30,0x00001)
$Time[$j] = GUICtrlCreateInput("",$a + 360+$d,$b+50+$j*35,100,30,0x00001)
$Stime[$j] = GUICtrlCreateInput("2022-11-02 17:32:56",$a + 460+$d,$b+50+$j*35,200,30,0x00001)
$Dtime[$j] = GUICtrlCreateInput("00:00:00",$a + 660+$d,$b+50+$j*35,160,30,0x00001)
$ACT[$j] = GUICtrlCreateButton("",$a + 840+$d,$b+50+$j*35,80,30,0x00001)
GUICtrlSetFont($NO[$j], 16, 800, 0, "宋体")
GUICtrlSetFont($Customer[$j], 16, 800, 0, "宋体")
GUICtrlSetFont($SPEC[$j], 16, 800, 0, "宋体")
GUICtrlSetFont($Time[$j], 16, 800, 0, "宋体")
GUICtrlSetFont($Stime[$j], 14, 800, 0, "宋体")
GUICtrlSetFont($Dtime[$j], 16, 800, 0, "宋体")
GUICtrlSetBkColor($Dtime[$j], 0x000000) ;控件的背景色
GUICtrlSetColor($Dtime[$j], 65280)
GUICtrlSetFont($ACT[$j], 16, 800, 0, "宋体")
Next
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg = $GUI_EVENT_CLOSE Then Exit
For $i=1 to 10 step 1
If $nMsg = $ACT[$i] Then
If GUICtrlRead($ACT[$i]) = "已完成" Then
GUICtrlSetData($ACT[$i],"开始")
Else
GUICtrlSetData($ACT[$i],"进行中")
AdlibRegister(_TimerUp($i))
EndIf
ExitLoop
EndIf
If $nMsg = $GUI_EVENT_CLOSE Then
ExitLoop
For $i=1 to 10
AdlibUnRegister(_TimerUp($i))
Next
Exit
EndIf
Next
;~ Switch $nMsg
;~ Case $GUI_EVENT_CLOSE
;~ Exit
;~ Case $ACT
;~ GUICtrlSetBkColor($ACT,0x00ff00)
;~ GUICtrlSetData($ACT,"已完成")
;~ EndSwitch
WEnd
Func _TimerUp($j)
$OnTime1 = DllCall("kernel32.dll", "int", "GetTickCount")
while 1
$OnTime2 = DllCall("kernel32.dll", "int", "GetTickCount")
$Hours = Floor(Mod($OnTime2 - $OnTime1, 86400000) / 3600000)
$Minutes = Floor(Mod(Mod($OnTime2 - $OnTime1, 86400000), 3600000) / 60000)
$Seconds = Floor(Mod(Mod(Mod($OnTime2 - $OnTime1, 86400000), 3600000), 60000) / 1000)
If StringLen($Hours)<2 Then $Hours="0"&$Hours
If StringLen($Minutes)<2 Then $Minutes="0"&$Minutes
If StringLen($Seconds)<2 Then $Seconds="0"&$Seconds
$time = $Hours & ":" & $Minutes & ":" & $Seconds
$time1 = GUICtrlRead($Dtime[$j])
If $time1 <> $time Then GUICtrlSetData($Dtime[$j], $time)
$nMsg = GUIGetMsg()
If $nMsg = $GUI_EVENT_CLOSE Then Exit
For $i=1 to 10 step 1
If $nMsg = $ACT[$i] Then
If GUICtrlRead($ACT[$i]) = "进行中" Then
GUICtrlSetData($ACT[$i],"暂停")
ExitLoop
Else
GUICtrlSetData($ACT[$i],"进行中")
_TimerUp($i)
ExitLoop
EndIf
EndIf
Next
WEnd
EndFunc ;==>_TimerUp
本帖最后由 afan 于 2022-11-10 19:18 编辑
rally 发表于 2022-11-10 18:45
感谢大大的支援 ! 我想请教下 : $iIX = ($iMsg - $Button) / 2 + 1 这个表达方式是怎么来的 ? ...
$iIX = ($iMsg - $Button) / 2 + 1 这个根据你创建控件的方式得来的
因为你在一次循环中创建了两个控件,因此,按钮的ID是间隔的
如果在循环中仅创建按钮,它们的ID就是连续的,就可以写成 $iIX = ($iMsg - $Button) + 1
包括消息循环里面的 Case $Button, $Button, $Button 也是这个原因,修改后就可以直接
Case $Button To $Button
至于回调函数 _Timer 里面的写法,如果需要简写,可以使用以下方式
au3版本支持map的使用map,不支持的使用字典 或Assign+Eval方式,或者直接用个大点的数组代替map
在_Timer_SetTimer创建定时器时将其ID与序号一一对应声明
之后在 _Timer 里就可以直接查询ID的序号而直接处理 #include <Timers.au3>
Global $hGUI, $Button, $Label, $aiTimerID
$hGUI = GUICreate('定时器数组', 272, 139, -1, -1)
For $i = 1 To 3
$Button[$i] = GUICtrlCreateButton('开始', 168, 8 + 40 * ($i - 1), 89, 25, 0)
$Label[$i] = GUICtrlCreateLabel('00:00:00', 8, 8 + 40 * ($i - 1), 146, 17)
Next
GUISetState()
Local $iMsg, $iIX
While 1
$iMsg = GUIGetMsg()
Switch $iMsg
Case -3
_Timer_KillAllTimers($hGUI)
GUIDelete()
Exit
Case $Button, $Button, $Button
$iIX = ($iMsg - $Button) / 2 + 1
If GUICtrlRead($iMsg) == '开始' Then
GUICtrlSetData($iMsg, '停止')
$aiTimerID[$iIX] = _Timer_SetTimer($hGUI, 1000, '_Timer')
Else
GUICtrlSetData($iMsg, '开始')
_Timer_KillTimer($hGUI, $aiTimerID[$iIX])
$aiTimerID[$iIX] = 0
EndIf
EndSwitch
WEnd
Func _Timer($hWnd, $iMsg, $iIDTimer, $iTime)
Switch $iIDTimer
Case $aiTimerID
GUICtrlSetData($Label, @HOUR & ':' & @MIN & ':' & @SEC)
Case $aiTimerID
GUICtrlSetData($Label, @HOUR & ':' & @MIN & ':' & @SEC)
Case $aiTimerID
GUICtrlSetData($Label, @HOUR & ':' & @MIN & ':' & @SEC)
EndSwitch
EndFunc ;==>_Timer afan 发表于 2022-11-10 12:28
感谢大大的支援 ! 我想请教下 : $iIX = ($iMsg - $Button) / 2 + 1 这个表达方式是怎么来的 ?我不明白意思,还请大大指点一下。
另外,如果我用阵列建n 个Button 。 Case $Button, $Button, $Button....... 这个有没有好的表达方法?
Func _Timer($hWnd, $iMsg, $iIDTimer, $iTime)
Switch $iIDTimer
Case $aiTimerID
Case $aiTimerID
Case $aiTimerID
........如果有n个(不确定的个数) 有没有变量表示方法 ? afan 发表于 2022-11-10 18:58
$iIX = ($iMsg - $Button) / 2 + 1 这个根据你创建控件的方式得来的
因为你在一次循环中创建了两个控 ...
非常谢谢大大解惑 ,这块我再根据大大的指导学习一下 。每次遇到难题都是大大解围 👍 afan 发表于 2022-11-10 12:28
大大 ,再帮看下我这样写倒计时,为什么每次点一个按钮开始,就会初始化其他正在计时的?
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Timers.au3>
Global $hGUI, $Button, $Label, $aiTimerID
$hGUI = GUICreate('定时器数组', 272, 139, -1, -1)
For $i = 1 To 3
$Button[$i] = GUICtrlCreateButton('开始', 168, 8 + 40 * ($i - 1), 89, 25, 0)
$Label[$i] = GUICtrlCreateLabel('00:00:00', 8, 8 + 40 * ($i - 1), 146, 17)
Next
GUISetState()
Local $iMsg, $iIX
While 1
$iMsg = GUIGetMsg()
Switch $iMsg
Case -3
_Timer_KillAllTimers($hGUI)
GUIDelete()
Exit
Case $Button, $Button, $Button
$OnTime1 = DllCall("kernel32.dll", "int", "GetTickCount")
$iIX = ($iMsg - $Button) / 2 + 1
If GUICtrlRead($iMsg) == '开始' Then
GUICtrlSetData($iMsg, '停止')
$aiTimerID[$iIX] = _Timer_SetTimer($hGUI, 1000, '_Timer')
Else
GUICtrlSetData($iMsg, '开始')
_Timer_KillTimer($hGUI, $aiTimerID[$iIX])
$aiTimerID[$iIX] = 0
EndIf
EndSwitch
WEnd
Func _Timer($hWnd, $iMsg, $iIDTimer, $iTime)
Switch $iIDTimer
Case $aiTimerID
$OnTime2 = DllCall("kernel32.dll", "int", "GetTickCount")
$Hours = Floor(Mod($OnTime2 - $OnTime1, 86400000) / 3600000)
$Minutes = Floor(Mod(Mod($OnTime2 - $OnTime1, 86400000), 3600000) / 60000)
$Seconds = Floor(Mod(Mod(Mod($OnTime2 - $OnTime1, 86400000), 3600000), 60000) / 1000)
If StringLen($Hours)<2 Then $Hours="0"&$Hours
If StringLen($Minutes)<2 Then $Minutes="0"&$Minutes
If StringLen($Seconds)<2 Then $Seconds="0"&$Seconds
$time0 = $Hours & ":" & $Minutes & ":" & $Seconds
$time1 = GUICtrlRead($Label)
ConsoleWrite($time1 & @CRLF)
If $time0<>$time1 Then GUICtrlSetData($Label, $time0)
;~ GUICtrlSetData($Label, @HOUR & ':' & @MIN & ':' & @SEC)
Case $aiTimerID
$OnTime3 = DllCall("kernel32.dll", "int", "GetTickCount")
$Hours = Floor(Mod($OnTime3 - $OnTime1, 86400000) / 3600000)
$Minutes = Floor(Mod(Mod($OnTime3 - $OnTime1, 86400000), 3600000) / 60000)
$Seconds = Floor(Mod(Mod(Mod($OnTime3 - $OnTime1, 86400000), 3600000), 60000) / 1000)
If StringLen($Hours)<2 Then $Hours="0"&$Hours
If StringLen($Minutes)<2 Then $Minutes="0"&$Minutes
If StringLen($Seconds)<2 Then $Seconds="0"&$Seconds
$time2 = $Hours & ":" & $Minutes & ":" & $Seconds
$time3 = GUICtrlRead($Label)
If $time2<>$time3 Then GUICtrlSetData($Label, $time2)
Case $aiTimerID
$OnTime4 = DllCall("kernel32.dll", "int", "GetTickCount")
$Hours = Floor(Mod($OnTime4 - $OnTime1, 86400000) / 3600000)
$Minutes = Floor(Mod(Mod($OnTime4 - $OnTime1, 86400000), 3600000) / 60000)
$Seconds = Floor(Mod(Mod(Mod($OnTime4 - $OnTime1, 86400000), 3600000), 60000) / 1000)
If StringLen($Hours)<2 Then $Hours="0"&$Hours
If StringLen($Minutes)<2 Then $Minutes="0"&$Minutes
If StringLen($Seconds)<2 Then $Seconds="0"&$Seconds
$time4 = $Hours & ":" & $Minutes & ":" & $Seconds
$time5 = GUICtrlRead($Label)
If $time4<>$time5 Then GUICtrlSetData($Label, $time4)
EndSwitch
EndFunc ;==>_Timer 本帖最后由 afan 于 2022-11-11 17:54 编辑
rally 发表于 2022-11-11 17:12
大大 ,再帮看下我这样写倒计时,为什么每次点一个按钮开始,就会初始化其他正在计时的?
#include
因为你每次点击 开始 计时,就会重置 GetTickCount 的值,而你的计时都是基于该值的,不同步才怪~
另外 GetTickCount 不需要这样DllCall,_Timer 函数里面的 $iTime 就是该数据。
建议:直接使用时间戳就好了,TimerInit()、 TimerDiff()
#include <Timers.au3>
#include <Date.au3>
Global $hGUI, $Button, $Label, $aiTimerID, $aTimer
$hGUI = GUICreate('定时器数组', 272, 139, -1, -1)
For $i = 1 To 3
$Button[$i] = GUICtrlCreateButton('开始', 168, 8 + 40 * ($i - 1), 89, 25, 0)
$Label[$i] = GUICtrlCreateLabel('00:00:00', 8, 8 + 40 * ($i - 1), 146, 17)
Next
GUISetState()
Local $iMsg, $iIX
While 1
$iMsg = GUIGetMsg()
Switch $iMsg
Case -3
_Timer_KillAllTimers($hGUI)
GUIDelete()
Exit
Case $Button, $Button, $Button
$iIX = ($iMsg - $Button) / 2 + 1
$aTimer[$iIX] = TimerInit()
If GUICtrlRead($iMsg) == '开始' Then
GUICtrlSetData($iMsg, '停止')
$aiTimerID[$iIX] = _Timer_SetTimer($hGUI, 1000, '_Timer')
Else
GUICtrlSetData($iMsg, '开始')
_Timer_KillTimer($hGUI, $aiTimerID[$iIX])
$aiTimerID[$iIX] = 0
EndIf
EndSwitch
WEnd
Func _Timer($hWnd, $iMsg, $iIDTimer, $iTime)
Switch $iIDTimer
Case $aiTimerID
__Timing(1)
Case $aiTimerID
__Timing(2)
Case $aiTimerID
__Timing(3)
EndSwitch
EndFunc ;==>_Timer
Func __Timing($iIX)
Local $timeDiff = TimerDiff($aTimer[$iIX])
Local $Hours, $Minutes, $Seconds
_TicksToTime($timeDiff, $Hours, $Minutes, $Seconds)
Local $time0 = StringFormat('%02d:%02d:%02d', $Hours, $Minutes, $Seconds)
If $time0 <> $aTimer[$iIX] Then GUICtrlSetData($Label[$iIX], $time0)
$aTimer[$iIX] = $time0
EndFunc ;==>__Timing afan 发表于 2022-11-11 17:30
因为你每次点击 开始 计时,就会重置 GetTickCount 的值,而你的计时都是基于该值的,不同步才怪~
另外...
感觉大大您这样写高级多了,我这样的写法太冗余了
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <array.au3>
#include <Timers.au3>
Global $hGUI, $Button, $Label, $aiTimerID
$hGUI = GUICreate('定时器数组', 272, 139, -1, -1)
For $i = 1 To 3
$Button[$i] = GUICtrlCreateButton('开始', 168, 8 + 40 * ($i - 1), 89, 25, 0)
$Label[$i] = GUICtrlCreateLabel('00:00:00', 8, 8 + 40 * ($i - 1), 146, 17)
Next
GUISetState()
Local $iMsg, $iIX
Local $a=0 ,$b=0 ,$c=0,$d=0 , $e=0 ,$f=0 ,$i=0, $j=0 ,$k=0
Global $sec = [$a,$b,$c,$d,$e,$f,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
While 1
$iMsg = GUIGetMsg()
Switch $iMsg
Case -3
_Timer_KillAllTimers($hGUI)
GUIDelete()
Exit
Case $Button, $Button, $Button
$OnTime1 = DllCall("kernel32.dll", "int", "GetTickCount")
$iIX = ($iMsg - $Button) / 2 + 1
If GUICtrlRead($iMsg) == '开始' Then
GUICtrlSetData($iMsg, '停止')
$aiTimerID[$iIX] = _Timer_SetTimer($hGUI, 1000, '_Timer')
ConsoleWrite($iIX)
Else
GUICtrlSetData($iMsg, '开始')
_Timer_KillTimer($hGUI, $aiTimerID[$iIX])
$aiTimerID[$iIX] = 0
EndIf
EndSwitch
WEnd
Func _Timer($hWnd, $iMsg, $iIDTimer, $iTime)
Switch $iIDTimer
Case $aiTimerID
$i+=1
Local $s,$m,$h
$s = Mod($i,60)
$m = Mod($i/60,60)
$h = Mod($i/60/60,60)
$time = StringFormat("%02d:%02d:%02d", $h, $m, $s)
GUICtrlSetData($Label, $time)
Case $aiTimerID
$j+=1
Local $s,$m,$h
$s = Mod($j,60)
$m = Mod($j/60,60)
$h = Mod($j/60/60,60)
$time = StringFormat("%02d:%02d:%02d", $h, $m, $s)
GUICtrlSetData($Label, $time)
Case $aiTimerID
$k+=1
Local $s,$m,$h
$s = Mod($k,60)
$m = Mod($k/60,60)
$h = Mod($k/60/60,60)
$time = StringFormat("%02d:%02d:%02d", $h, $m, $s)
GUICtrlSetData($Label, $time)
EndSwitch
EndFunc ;==>_Timer
页:
[1]