Here is a very simple script that will work with a countdown timer made in GT designer - dropbox link attached.
as it gets closer to the end of the countdown it goes from green (plus 5 mins) to yellow (5 - 2 mins) to red (0 - 2 mins) and flashes red/white once it runs out of time.
It uses the countdownclock.gtzip which is just a simple countdown timer.
Its been working on multiple events and keeping speakers to time as best as possible, as we send it back on a reverse feed on all the vimxcallers.
As far as I can tell It does not handle time that crosses midnight - as most of the events I do are across the day its not been an issue.
Hope someone finds it useful or as a bit of a jump start into scripting in vmix, as there is not much to go on sometimes.
here's is the script for vmix scripting.
dim i As Integer
dim time1 as String
dim hourset as String
dim minset as String
dim secset as String
dim Timemake as string
dim date1 as DateTime
dim remainingtime as TimeSpan
dim rightnow as dateTime
dim flashx as Boolean
dim tClose as Integer
dim tAlmost as Integer
' set parameters
flashx = false
i = 1
tClose = (5*60) ' set to 5 mins - is number of seconds
tAlmost = (2*60) ' set to 2 mins - - is number of seconds
Do Until i = 2
' if you don't have countdownclock.gtzip and a field called Countdown.Text it won't do much
dim content as string = Input.Find("countdownclock.gtzip").Text("CountDown.Text")
'Console.WriteLine(System.DateTime.Now.ToLongTimeString + " " + content)
rightnow = DateTime.Now
hourset = content.Substring(3,2)
minset = content.Substring(6,2)
secset = content.Substring(9,2)
Timemake = hourset & ":" & minset &":" & secset
date1 = Convert.ToDateTime(Timemake)
Catch ex As System.Exception
remainingtime = date1.Subtract(rightnow)
console.Writeline("Time Left -" +remainingtime.TotalSeconds.Tostring)
If remainingtime.TotalSeconds > tClose then
Else if remainingtime.TotalSeconds < tAlmost then
' Flash when out of time.
if remainingtime.TotalSeconds < 1 then
if flashx = true then
flashx = false
flashx = true