Parse Timeline value
How would one parse the value of an active timeline?
Say I create a TL for system shutdown, for example. I want my system to shutdown 4 hours after x button is pushed. I know it will shutdown 4 hours from when I pushed it, but how can I send the value of the active timeline counting down to a text box?
Sample code appreciated!
Say I create a TL for system shutdown, for example. I want my system to shutdown 4 hours after x button is pushed. I know it will shutdown 4 hours from when I pushed it, but how can I send the value of the active timeline counting down to a text box?
Sample code appreciated!
0
Comments
// create timeline that repeats every 1 minute timeline_event[tl4hourTimer] { stack_var integer minutesRemaining stack_var integer nHour stack_var integer nMin minutesRemaining = 240 - timeline.repetition nMin = minutesRemaining % 60 nHour = type_cast(minutesRemaining / 60) send_command dvTouchPanelArray,"'!T',nTimerDisplayAdr,itoa(nHour),':',itoa(nMin)" if(!minutesRemaining) { timeline_kill(tl4hourTimer) fnExecuteSystemShutdown(); } }Something like that was the first thing that came to my mind.
edit: I just realized you wanted it to count down from 4 hours, so I modified the code to count down instead of up