I like having the Time displayed on when playing live and having read the thread Time Clock I updated the script so that the time can be included in the global rack space rather than in each rack space. The display is only updated every ‘n’ seconds and the format can be set as required. The only issue I had getting this to work is the initialisation of the timer, the rack space must be changed once to get the timer started, but once running stays running.
Add a label widget named lbl_time to the global rack space and add the following lines of code to the global rack space script.
var lbl_time : widget
var int_interval : integer = 1 // Update interval in seconds
var str_format : string = "%H:%M:%S" // Format of the clock display
// Called by timer ticking
On TimerTick(ns : double)
var dbl_mSeconds : double
dbl_mSeconds = ClockTime()
If (Floor(dbl_mSeconds / 500) % (int_interval << 1)) == 0 Then
lbl_time.SetWidgetLabel (FormatTime(dbl_mSeconds, str_format))
End
End
// Called when rackspace is activated
On Rackspace(oldRs : Integer, newRs : Integer )
If !GetTimersRunning() Then
SetTimersRunning(true)
End
End
There may be a better way but this ticks along nicely
I can see that the script only starts the timers going once you change a rackspace. So if you’ve just added the script, you would need to click to a new local rackspace in order to kick it off.
Does this gig file work for you?
I also changed it so that the timers start when the script is first intialized (when the gig first loads). So it will start immediately.
Sorry me rushing and not checking, i did get my rack spaces and scripts totally screwed. There is a global script and a global rackspace script, I meant to say “Also are you sure it is in the global rack space script and not the global script.?” Sorry
Did you try the example gig file I posted above? If it works, you then have a working example to see the widget settings I used, and the global rackspace script.
If you aren’t currently using the global rackspace in your own gig file, you can even export the global rackspace from my example and then import it into your own file.