#include <GUIConstantsEx.au3>
#include <Timers.au3>
func Clock()
GUISetFont(Random(15,35))
$h = GUICtrlCreateLabel("", 0, 30,100,100)
GUICtrlSetData($h,@hour)
GUISetFont(Random(15,35))
$m = GUICtrlCreateLabel("", 200, 30,100,100)
GUICtrlSetData($m,@min)
GUISetFont(Random(15,35))
$s = GUICtrlCreateLabel("", 400, 30,100,100)
GUICtrlSetData($s,@sec)
EndFunc
GUICreate("My clock", 500, 500)
Local $hStarttime = _Timer_Init()
Clock()
GUISetState(@SW_SHOW)
While 1
if _Timer_Diff($hStarttime) > 1000 Then
$hStarttime = _Timer_Init()
Clock()
EndIf
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|