Hi
I am trying to create a script with timer for UI and with labels in the max. What i want to do is to stop the timer and 60 for seconds and update 1 for minutes. That part is done but can;t actually stop the seconds at 60 and restart the counter again. And I dont want to use another timer for the minutes as i am doing now but the seconds should affect the counter of the number of the minutes. Here is the code for it:
Rollout DigiClock “Digital Clock”
(
local sec,
min
timer SecTme "Tme" interval:1000
timer MinTme "MinTme" interval: 60000
label hour " Hr Mn Sc" align:#left
label dots " : :" across: 20 offset: [30,0] align:#center
label hrs "00" across:30 align:#center
label minuts "00" offset:[20,0]
label secs "01" offset:[40,0]
fn SecTime =
(
sec =(secs.text as integer)+1
if sec <10 then
(
secs.text = "0" +sec as string
) else
(
secs.text = sec as string
)
)
fn MinTime =
(
min =(minuts.text as integer)+1
if min <10 then
(
minuts.text = "0" +min as string
) else
(
minuts.text = min as string
)
)
On SecTme tick do
(
SecTime()
)
On MinTme tick do
(
MinTime()
)
)
createDialog DigiClock width:150