Production Switchers

 View Only
  • 1.  Script Set Countdown Timer

    Posted 04-18-2013 19:03
    Has anyone made a script to set a countdown timer to a specific date and time?


  • 2.  RE: Script Set Countdown Timer

    Posted 04-19-2013 14:01
    The basic command to set a timer start value is: clockTimer.StartAt = "00:01:00.0"

    You would also need to declare your timer variable: dim clockTimer as xpClockTimerWidget

    I have set specific times to count down from (ie: 3 mins, 2:30, etc), but with a little creative scripting you can probably set a variable to use the system time and date to set the StartAt time.

    #Carbonite


  • 3.  RE: Script Set Countdown Timer

    Posted 04-30-2013 19:24
    Thanks Brian. This is what I have so far but not sure why its not working.

    dim setTimer as xpClockTimerWidget

    dim timenow as xpClockTimerWidget

    Dim intHour As Integer

    Dim intMin As Integer

    Dim intSec As Integer

    Dim TSecs As Long

    engine.GetWidgetByName("bloomsday_start1", setTimer)

    engine.GetWidgetByName("nowTime", timenow)

    TSecs = DateDiff("s", timenow, "09:00:00.00")

    intSec = TSecs Mod 60

    intMin = (TSecs / 60) Mod 60

    intHour = ((TSecs / 60) / 60) Mod 24

    setTimer.StartAt = intHour - 1 & ":" & intMin & ":" & intSec

    setTimer.Reset

    setTimer.Start

    #Carbonite


  • 4.  RE: Script Set Countdown Timer

    Posted 05-01-2013 14:53
    Richie,

    Try this:



    dim setTimer as xpClockTimerWidget

    Dim TSecs As Long

    Dim current as Date

    engine.GetWidgetByName("ClockTimer1", setTimer)

    current = Now

    TSecs = DateDiff("s", Hour(current) & ":" & Minute(current) & ":" & Second(current) & ".00", "11:00:00.00")

    setTimer.TimerValue = TSecs * 1000

    setTimer.Start



    #Carbonite