Rank: Member
Groups: Registered
Joined: 3/13/2022(UTC) Posts: 20 Thanks: 14 times
|
I have an overlay that I want display every 15 minutes starting on the hour.
I know how to create shortcuts and triggers. How can I get an overlay to show up at 1:00, 1:15, 1:30, 1:45 and 2:00, etc?
DJ
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/23/2019(UTC) Posts: 557
Thanks: 62 times Was thanked: 131 time(s) in 119 post(s)
|
Add a countdown to a title and use the OnCountdownCompleted trigger to execute functions, like showing the overlay and restarting the countdown.
|
1 user thanked dmwkr for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 3/13/2022(UTC) Posts: 20 Thanks: 14 times
|
Thanks for your reply.
Okay... I am familiar with countdowns.
Where I’m stuck is, getting something to happen at a specific time. I’ve been able to trigger things based on a time interval like 5 min from now. But that requires that I watch the clock and initiate the trigger at a precise time. I need vMix to watch the clock for me and do something at exactly 1:00 pm or some other predetermined time.
If that’s possible, I’d appreciate any guidance to point me in the right direction.
Thanks in advance.
DJ
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 531 Location: athens Thanks: 128 times Was thanked: 72 time(s) in 68 post(s)
|
Hello. For this kind of tasks personally im using 3rd party vmix tool. Either vscheduler for Vmix or triggers in Bitfocus companion. I think also utc for vmix can do things in a scheduled time
|
1 user thanked nikosman88 for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/23/2019(UTC) Posts: 557
Thanks: 62 times Was thanked: 131 time(s) in 119 post(s)
|
To start the automation you could use something like this script: https://forums.vmix.com/...ng-for-Dummies#post74242For the repeated countdowns make sure to use the countdown, not the "countdown to time". The countdown to time does not work with the OnCoundtdownCompleted trigger.
|
1 user thanked dmwkr for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 303 Thanks: 17 times Was thanked: 79 time(s) in 60 post(s)
|
you can do this with a script, this gives you flexibility regarding the times to be executed. in the line “dim zeiten As” you enter all your required times. in the case of the overlayIN, in the example here, the overlay is then switched off again with a trigger on the input. Trigger: OnOverlayIN Function: OverlayInput1Out Delay: the time you wish to have the overly online, 2000 for 2 seconds Code:' in the following code line, you put your needed times in the 24h format, with quotes, separated by a comma
' you can put as many times in, as you need
' this could be different, when your windows is set to 12h format, tha am/pm thing???
Dim zeiten As String() = {"09:53", "09:54", "09:55", "09:56", "09:57", "09:58"}
'this is to check, if a new day has come. if this is true, the already executed times will be cleared
Dim lastExecutionDate As Date = Date.Today
' this array holds the already executed times
Dim executed As Boolean() = New Boolean(zeiten.Length - 1) {}
'loop starts here
While True
Dim currentTime As DateTime = DateTime.Now
'check, if a new day has come, if this is true, the already executed times will be cleared
If lastExecutionDate <> Date.Today Then
executed = New Boolean(zeiten.Length - 1) {}
lastExecutionDate = Date.Today
End If
'check if the actual time is in your array, and, if not already executed, execute the vMix comand or commands
Dim currentFormattedTime As String = currentTime.ToString("HH:mm")
For i As Integer = 0 To zeiten.Length - 1
If zeiten(i) = currentFormattedTime AndAlso Not executed(i) Then
' here the vMix command will be executed, when a new time is true, you could add more commands here
' this example puts overlay 1 online, with Input1, please change this to your needs
API.Function("OverlayInput1In", Input:="1")
executed(i) = True ' mark the time as executed
Exit For
End If
Next
Sleep(200)
End While
|
1 user thanked Peter1000 for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/23/2020(UTC) Posts: 170 Location: Wichita Thanks: 10 times Was thanked: 24 time(s) in 20 post(s)
|
Originally Posted by: DJLTC I have an overlay that I want display every 15 minutes starting on the hour.
I know how to create shortcuts and triggers. How can I get an overlay to show up at 1:00, 1:15, 1:30, 1:45 and 2:00, etc?
DJ I too have a script except it's simpler. I use it to display a "Bug" on the screen. "Bug" is the term for a logo that appears for a short time and then disappears, in television it will be seen most as it's how a station identifies itself regularly to meet FCC regulations. My script turns on the "bug" which is an overlay for one minute out of every five minutes. Code:
'Bug control, turn on the Identity Bug for one minute out of every five minutes
console.writeline ( "Bug control started")
Dim BugIsOn as boolean = false
API.Function("OverlayInput4Out")
Do While True
Dim LastDigitOfMinutes as string = DateTime.Now.ToString("mm").substring(1,1)
if BugIsOn then
If LastDigitOfMinutes <> "5" and LastDigitOfMinutes <> "0" Then
' No longer a minute ending with 0 or 5 so turn the bug off
API.Function("OverlayInput4Out")
BugIsOn = false
End If
else
If LastDigitOfMinutes = "5" or LastDigitOfMinutes = "0" Then
' Minute now ends with "0" or "5" - Turn the bug on
API.Function("OverlayInput4In",Input:="0b7f2f1a-5f71-44bd-998e-21312af20641")
BugIsOn = true
End If
End If
sleep(1000) ' Sleep for one second
Loop
For your use however this should work Code:
Dim OverlayIsOn as boolean = false
API.Function("OverlayInput4Out")
Do While True
Dim SMinutes as string = DateTime.Now.ToString("mm")
if OverlayIsOn then
If SMinutes = "01" or SMinutes = "16" or SMinutes = "31" or SMinutes = "46" Then
API.Function("OverlayInput4Out")
BugIsOn = false
End If
else
If SMinutes = "00" or SMinutes = "15" or SMinutes = "30" or SMinutes = "45" Then
API.Function("OverlayInput4In",Input:="0b7f2f1a-5f71-44bd-998e-21312af20641") <------ Change this to the input for your overlay!
OverlayIsOn = true
End If
End If
sleep(1000) ' Sleep for one second
Loop
Note: You didn't say how long the overlay should remain visible or even if it would be removed automatically so I left it at one minute. Also if you use my script be sure to change it for whatever overlay you are using and whatever input you are using for the overlay.
|
1 user thanked Roy Sinclair for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 3/13/2022(UTC) Posts: 20 Thanks: 14 times
|
Originally Posted by: nikosman88 Hello. For this kind of tasks personally im using 3rd party vmix tool. Either vscheduler for Vmix or triggers in Bitfocus companion. I think also utc for vmix can do things in a scheduled time Thank you!! Much appreciated! 👍🏼
|
|
|
|
Rank: Member
Groups: Registered
Joined: 3/13/2022(UTC) Posts: 20 Thanks: 14 times
|
Originally Posted by: Peter1000 you can do this with a script, this gives you flexibility regarding the times to be executed. in the line “dim zeiten As” you enter all your required times. in the case of the overlayIN, in the example here, the overlay is then switched off again with a trigger on the input. Trigger: OnOverlayIN Function: OverlayInput1Out Delay: the time you wish to have the overly online, 2000 for 2 seconds Code:' in the following code line, you put your needed times in the 24h format, with quotes, separated by a comma
' you can put as many times in, as you need
' this could be different, when your windows is set to 12h format, tha am/pm thing???
Dim zeiten As String() = {"09:53", "09:54", "09:55", "09:56", "09:57", "09:58"}
'this is to check, if a new day has come. if this is true, the already executed times will be cleared
Dim lastExecutionDate As Date = Date.Today
' this array holds the already executed times
Dim executed As Boolean() = New Boolean(zeiten.Length - 1) {}
'loop starts here
While True
Dim currentTime As DateTime = DateTime.Now
'check, if a new day has come, if this is true, the already executed times will be cleared
If lastExecutionDate <> Date.Today Then
executed = New Boolean(zeiten.Length - 1) {}
lastExecutionDate = Date.Today
End If
'check if the actual time is in your array, and, if not already executed, execute the vMix comand or commands
Dim currentFormattedTime As String = currentTime.ToString("HH:mm")
For i As Integer = 0 To zeiten.Length - 1
If zeiten(i) = currentFormattedTime AndAlso Not executed(i) Then
' here the vMix command will be executed, when a new time is true, you could add more commands here
' this example puts overlay 1 online, with Input1, please change this to your needs
API.Function("OverlayInput1In", Input:="1")
executed(i) = True ' mark the time as executed
Exit For
End If
Next
Sleep(200)
End While
Thank you!! Much appreciated! 👍🏼
|
|
|
|
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