Live Production Software Forums

Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
#1 Posted : Sunday, October 11, 2020 10:48:43 PM(UTC)

Rank: Newbie

Groups: Registered
Joined: 5/3/2015(UTC)
Posts: 8
Location: UK

Was thanked: 1 time(s) in 1 post(s)
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
' nothing
End Try
remainingtime = date1.Subtract(rightnow)
console.Writeline("Time Left -" +remainingtime.TotalSeconds.Tostring)

If remainingtime.TotalSeconds > tClose then
Else if remainingtime.TotalSeconds < tAlmost then
End if

' Flash when out of time.
if remainingtime.TotalSeconds < 1 then
if flashx = true then
flashx = false
flashx = true
End if
End if

Sleep (300)

#2 Posted : Monday, October 12, 2020 1:45:49 AM(UTC)

Rank: Advanced Member

Groups: Registered
Joined: 5/24/2014(UTC)
Posts: 34
Location: Brazil

Thanks: 43 times
Was thanked: 4 time(s) in 2 post(s)
Hi Alexbyrd, the dropbox link isnt functional.
#3 Posted : Tuesday, October 13, 2020 3:51:38 AM(UTC)

Rank: Newbie

Groups: Registered
Joined: 5/3/2015(UTC)
Posts: 8
Location: UK

Was thanked: 1 time(s) in 1 post(s)
link fixed - thanks for letting me know.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.