You can set the timer's start time using the following ogScript command (unfortunately no Visual Logic).
ogscript.getTimerManager().getTimer('countdown').setStart(finalTime);
Use your timer's id instead of "countdown".
The finalTime is a number in milliseconds. If you want to get that number from the XP duration, you can do the following:
var time = params.getParam("localhost:8020:XPression", 'xprn.sequenceitem.take10000.duration', 0).getValue()
if (time != "") {
var hours_inMs = parseInt(time.substring(0,2)) * 3600000;
var mins_inMs = parseInt(time.substring(3,5)) * 60000;
var secs_inMs = parseInt(time.substring(6,8)) * 1000;
var ms_inMs = parseInt(time.substring(9,11));
var finalTime = hours_inMs + mins_inMs + secs_inMs + ms_inMs;
ogscript.debug("final time is " + finalTime);
ogscript.getTimerManager().getTimer('countdown').setStart(finalTime);
ogscript.getTimerManager().getTimer('countdown').resetTimer();
}
Now that being said, you can also just drop the "countdown' parameter for any take item, and see it's current time remaining (for example, for take 10000, use the xprn.sequenceitem.take10000.countdown parameter). It updates every 1/2 a second I think, which is not as frequent as the XP display, but it's pretty close.
#DashBoard