vMix Forums
»
General
»
General Discussion
»
Pulling time of day into an input?
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Our show operates on eastern timezone, trying to incorporate a clock into the show and show it on air. It cannot rely on the local computer clock at all, because we have operators in other time zones as well, and we are trying to accomplish this without using different time offsets and therefore different show file versions.
Anyone know of a way to pull the time of day from perhaps a website, as a data feed into a title, or something like that? We don't need to display seconds, just the hour and minute.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: knbPixels Our show operates on eastern timezone, trying to incorporate a clock into the show and show it on air. It cannot rely on the local computer clock at all, because we have operators in other time zones as well, and we are trying to accomplish this without using different time offsets and therefore different show file versions.
Anyone know of a way to pull the time of day from perhaps a website, as a data feed into a title, or something like that? We don't need to display seconds, just the hour and minute. Maybe this might help (google help ;-) ) in a script to display ( sorry Retrieve) eastern time from any computer anywhere Code:Dim eastern As DateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time")
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Originally Posted by: knbPixels Our show operates on eastern timezone, trying to incorporate a clock into the show and show it on air. It cannot rely on the local computer clock at all, because we have operators in other time zones as well, and we are trying to accomplish this without using different time offsets and therefore different show file versions.
Anyone know of a way to pull the time of day from perhaps a website, as a data feed into a title, or something like that? We don't need to display seconds, just the hour and minute. Maybe this might help (google help ;-) ) in a script to display eastern time from any computer anywhere Code:Dim eastern As DateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time")
I know nothing about scripting but I'll give it a shot, thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: knbPixels Originally Posted by: doggy Originally Posted by: knbPixels Our show operates on eastern timezone, trying to incorporate a clock into the show and show it on air. It cannot rely on the local computer clock at all, because we have operators in other time zones as well, and we are trying to accomplish this without using different time offsets and therefore different show file versions.
Anyone know of a way to pull the time of day from perhaps a website, as a data feed into a title, or something like that? We don't need to display seconds, just the hour and minute. Maybe this might help (google help ;-) ) in a script to display eastern time from any computer anywhere Code:Dim eastern As DateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time")
I know nothing about scripting but I'll give it a shot, thanks! to actually get that time on an input you will have to use a title and put the data from the script in the title and layer it on the input "Scripting for dummies" Post in the forum should help you along
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Here you go Code:
Do while True
Dim eastern As DateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time")
API.Function("SetText",Input:="Text Middle Centre Left Right Sharp.gtzip",SelectedName:="Message.Text",Value:=eastern.ToString("HH:mm"))
Sleep(250)
Loop
'where "Text Middle Centre Left Right Sharp.gtzip" is the name of a standard vMix title input
Copy code into a script, save and run it
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Here you go Code:
Do while True
Dim eastern As DateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time")
API.Function("SetText",Input:="Text Middle Centre Left Right Sharp.gtzip",SelectedName:="Message.Text",Value:=eastern.ToString("HH:mm"))
Sleep(250)
Loop
'where "Text Middle Centre Left Right Sharp.gtzip" is the name of a standard vMix title input
Copy code into a script, save and run it Thanks I'll try that!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Here you go Code:
Do while True
Dim eastern As DateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time")
API.Function("SetText",Input:="Text Middle Centre Left Right Sharp.gtzip",SelectedName:="Message.Text",Value:=eastern.ToString("HH:mm"))
Sleep(250)
Loop
'where "Text Middle Centre Left Right Sharp.gtzip" is the name of a standard vMix title input
Copy code into a script, save and run it Made an input from a standard vMix title input, left it as it comes standard....then I added the script and ran it, but I get nothing happening in the input I created. I also made sure the input name matches that same name of the title I selected, and nothing happens.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: knbPixels
Made an input from a standard vMix title input, left it as it comes standard....then I added the script and ran it, but I get nothing happening in the input I created. I also made sure the input name matches that same name of the title I selected, and nothing happens.
You say a standard vMix title , not all titles contain a fieldname that is called "Message.Text" , maybe check that or maybe a screenshot of the title editor and of the script
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Originally Posted by: knbPixels
Made an input from a standard vMix title input, left it as it comes standard....then I added the script and ran it, but I get nothing happening in the input I created. I also made sure the input name matches that same name of the title I selected, and nothing happens.
You say a standard vMix title , not all titles contain a fieldname that is called "Message.Text" , maybe check that or maybe a screenshot of the title editor and of the script I actually just used the standard title that you chose as an example image (14).png (33kb) downloaded 1 time(s). image (15).png (32kb) downloaded 0 time(s).
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: knbPixels I actually just used the standard title that you chose as an example
Strange as i can asure you that it works here add: console.writeline(eastern) between the line Dim.. and API... and see what it says in the console when you run the script (= keeping the settings-script window open/ the black part )
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Originally Posted by: knbPixels I actually just used the standard title that you chose as an example
Strange as i can asure you that it works here add: console.writeline(eastern) between the line Dim.. and API... and see what it says in the console when you run the script (= keeping the settings-script window open/ the black part ) The console returns the date and time in Eastern TZ
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Originally Posted by: knbPixels I actually just used the standard title that you chose as an example
Strange as i can asure you that it works here add: console.writeline(eastern) between the line Dim.. and API... and see what it says in the console when you run the script (= keeping the settings-script window open/ the black part ) When I start a new project file I can get the time to appear in the input, although it's in 24 hour format. Maybe I have an errant input that it's affecting in my main file, let me check
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Ok yeah, I already had a title created that was called that same title name and it was being affected instead of the new one....got that sorted out. It's in 24 hour format
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: knbPixels Ok yeah, I already had a title created that was called that same title name and it was being affected instead of the new one....got that sorted out. It's in 24 hour format see change at end for AM/PM time display API.Function("SetText",Input:="Text Middle Centre Left Right Sharp.gtzip",SelectedName:="Message.Text",Value:=eastern.ToString("HH:mm tt"))
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/7/2024(UTC) Posts: 72 Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Originally Posted by: knbPixels Ok yeah, I already had a title created that was called that same title name and it was being affected instead of the new one....got that sorted out. It's in 24 hour format see change at end for AM/PM time display API.Function("SetText",Input:="Text Middle Centre Left Right Sharp.gtzip",SelectedName:="Message.Text",Value:=eastern.ToString("HH:mm tt")) Got it, thanks! fully functional now! you rock!
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Pulling time of day into an input?
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