vMix Forums
»
General
»
General Discussion
»
Making Countdown/Timer only display in seconds
Rank: Newbie
Groups: Registered
Joined: 3/11/2021(UTC) Posts: 8
|
Hi everyone.
I'm trying to create a timer that only displays the timer/countdown in seconds. Is this possible?
I see that the Display Format allows you to add the timer as HH:mm, HH:mm:ss, ss and a few others. But I'd love it to be "ssss" as I need to display seconds from 0 to 5000 continuously
Can this be done, through countdown or with scripts?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,223 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 303 Thanks: 17 times Was thanked: 79 time(s) in 60 post(s)
|
if you only want to display seconds, counting up, there is a very simple solution make a new script copy this in: Code:dim second as integer =0
do while true
API.Function("SetText",Input:="Title 0- The Classic Blue.gtzip",SelectedIndex:="1" ,Value:=second)
second = second + 1
sleep (1000)
loop
load the Title Title 0- The Classic Blue.gtzip from the predefined Titles. start the script the script passes the value to the Title and puts it in the first field. to stop or reset the time, some coding is needed again. To implement more complex time displays, follow the link in doggy's post.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 3/11/2021(UTC) Posts: 8
|
Originally Posted by: doggy Cheers that makes sense. Thanks for your help Doggy your help is much appreciated!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,223 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
As peter1000's answer is the basic way to go , but if you want to play with date/time data and some formatting (not just for counting up seconds) ;-) Code:dim StartTime as DateTime
Dim ts As TimeSpan
Dim NowTime As DateTime
do while true
StartTime = DateTime.Now()
dim total as integer = 0
do while total < 10
NowTime = DateTime.Now()
ts = NowTime.Subtract(StartTime)
total = ((ts.Hours * 60) + ts.Minutes) * 60 + ts.Seconds
API.Function("SetText",Input:="sometitle.gtzip",SelectedName:="Headline.Text",Value:=string.Format("T:{0,4}",total))
'console.writeline((string.Format("T:{0,4}", total)))
sleep(1000)
Loop
Loop
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,223 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
;-)Code:API.Function("SetText",Input:="greenmod.gtzip",SelectedName:="Headline.Text",Value:="0")
Do while true
sleep(1000)
API.Function("SetText",Input:="greenmod.gtzip",SelectedName:="Headline.Text",Value:="+=1")
Loop
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Making Countdown/Timer only display in seconds
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.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close