Here is a panel that outputs a debug statement when a timer hits a value specified by the user. Use Views->openGear Debug Information to see the debug console.
<abs contexttype="opengear" gridsize="20" id="_top" keepalive="false" style="">
<timer autostart="false" id="Countdown" pattern="HH:mm:ss" rate="1000" start="00:00:10" stop="00:00:00">
<timertask tasktype="ogparamset">params.setValue('time', 0, event.getDisplay());</timertask>
<timertask tasktype="timercontrol">timer = ogscript.getTimerManager().getTimer('Countdown');
if (timer.getCurrent() == params.getValue("cueTime",0) * 1000) {
ogscript.debug("SEND TAKE COMMAND TO XP");
}
</timertask>
</timer>
<meta>
<params>
<param access="1" maxlength="0" name="time" oid="time" type="STRING" value="00:00:00" widget="label"/>
<param access="1" constraint="0.0;10.0;0.0;10.0;1" constrainttype="INT_STEP_RANGE" name="Cue Time" oid="cueTime" precision="0" type="INT16" value="3" widget="default"/>
</params>
</meta>
<param expand="true" height="60" left="300" oid="time" style="style:timerLabel" top="100" width="260"/>
<button buttontype="push" height="60" left="580" name="GO" top="100" width="120">
<task tasktype="timercontrol">ogscript.getTimerManager().getTimer('Countdown').startTimer(true);</task>
</button>
<param expand="true" height="60" left="60" oid="cueTime" showlabel="false" top="100" width="200"/>
<label height="20" left="60" name="Do Action at: " style="txt-align:west" top="80" width="200"/>
</abs>
As you can see, the timer has a task. I set the frequency of the timer to be every 1000 ms, so that task runs once per second. Every time the task runs, I check if the current time is the same as the value set by the user in a parameter. If it is, then I do the debug statement.
Instead of the debug statement, you'll likely want to send a command to your graphic engine. It's not clear if you are using XPression, or something else. If it's XP, then you can just send a RossTalk command to XP:
Something like:
rosstalk.sendMessage("1.2.3.4", 7788, "TAKE 1001");
Where 1001 is the takeid of the graphic, and 1.2.3.4 is the IP of the XPression machine.
#DashBoard