logo

Live Production Software Forums


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

Notification

Icon
Error

Options
Go to last post Go to first unread
ticker  
#1 Posted : Friday, January 28, 2022 7:08:12 PM(UTC)
ticker

Rank: Member

Groups: Registered
Joined: 4/6/2020(UTC)
Posts: 19
Man
Australia
Location: Melbourne

Hey all, trying to add a world clock to our ticker bar down the bottom, which flips between say 10 different city times every 10 seconds.

Any one been able to do this? I've done a fair bit of researching but really struggling. I've looked into APIs for world clocks etc but it just ends in a habit hole of google ads and nothing to show for it.

Cheers.
doggy  
#2 Posted : Friday, January 28, 2022 7:41:36 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: ticker Go to Quoted Post
Hey all, trying to add a world clock to our ticker bar down the bottom, which flips between say 10 different city times every 10 seconds.

Any one been able to do this? I've done a fair bit of researching but really struggling. I've looked into APIs for world clocks etc but it just ends in a habit hole of google ads and nothing to show for it.

Cheers.



using scripting will be your best bet to update the ticker content using a correct time format for the timing and zone selection (maybe even datasource)

Sure you want this in a ticker or is it an addition outside the ticker ?

see:

https://forums.vmix.com/...ng-for-Dummies#post89490
doggy  
#3 Posted : Friday, January 28, 2022 9:11:32 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
timezones.png (201kb) downloaded 28 time(s).

timezonetitle.png (78kb) downloaded 9 time(s).

Code:
'Title has Location.Text
'Title has timedif.Text to hold the timezone adjustment (will need to be hidden)
'Title has Zonetime.Text that will receive the current location time

' A data source  with Location in one column and timeadjust in the other 
' link data source appropriatly (Location.Text  &  timedif.Text 
' let the datasource auto loop with desired delay
' run the script

dim zone as integer = 0
dim oldlocation as string = ""
dim location as string = ""
dim zonetime as DateTime 

do while true
   location = Input.Find("timezone.gtzip").Text("Location.Text") 

 if location <> oldlocation 
   zone = CInt(Input.Find("timezone.gtzip").Text("timedif.Text")) 
   zonetime = DateTime.Now.AddHours(zone)
   Input.Find("timezone.gtzip").Text("Zonetime.Text")= zonetime.ToString("H:mm")
   oldlocation = location
 end if 

sleep(250)
loop

leithgolding  
#4 Posted : Thursday, February 10, 2022 10:30:13 AM(UTC)
leithgolding

Rank: Newbie

Groups: Registered
Joined: 11/16/2021(UTC)
Posts: 2
Australia
Location: Melbourne

Thanks: 1 times
thanks for this script, I used it on a show recently and it worked magnificatly, however one thing that I noticed is that we had a couple of timezones that are 1/2 hour differences for example Darwin is 1.5 hours behind Melbourne. when I pluged 1.5 into the spreadsheet it imported fine into the data manager as 1.5 but when the script ran it rounded the value up to 2! so Darwin was 2 hours behind rather then the 1.5 hours, is there something in the script that I missed?

thanks again for the help
doggy  
#5 Posted : Thursday, February 10, 2022 6:36:59 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: leithgolding Go to Quoted Post
thanks for this script, I used it on a show recently and it worked magnificatly, however one thing that I noticed is that we had a couple of timezones that are 1/2 hour differences for example Darwin is 1.5 hours behind Melbourne. when I pluged 1.5 into the spreadsheet it imported fine into the data manager as 1.5 but when the script ran it rounded the value up to 2! so Darwin was 2 hours behind rather then the 1.5 hours, is there something in the script that I missed?

thanks again for the help


Can't they do like most of the world ;-)


change:
Integer to Double
CInt to CDbl

Helpful info : Google-> What is Difference Between "int" and "double"
thanks 1 user thanked doggy for this useful post.
leithgolding on 2/14/2022(UTC)
leithgolding  
#6 Posted: : Monday, February 14, 2022 3:41:28 PM(UTC)
leithgolding

Rank: Newbie

Groups: Registered
Joined: 11/16/2021(UTC)
Posts: 2
Australia
Location: Melbourne

Thanks: 1 times
Thanks for the code!

we like to be a little different here!

MazajMusic  
#7 Posted : Tuesday, August 27, 2024 7:57:01 AM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
timezones.png (201kb) downloaded 28 time(s).

timezonetitle.png (78kb) downloaded 9 time(s).

Code:
'Title has Location.Text
'Title has timedif.Text to hold the timezone adjustment (will need to be hidden)
'Title has Zonetime.Text that will receive the current location time

' A data source  with Location in one column and timeadjust in the other 
' link data source appropriatly (Location.Text  &  timedif.Text 
' let the datasource auto loop with desired delay
' run the script

dim zone as integer = 0
dim oldlocation as string = ""
dim location as string = ""
dim zonetime as DateTime 

do while true
   location = Input.Find("timezone.gtzip").Text("Location.Text") 

 if location <> oldlocation 
   zone = CInt(Input.Find("timezone.gtzip").Text("timedif.Text")) 
   zonetime = DateTime.Now.AddHours(zone)
   Input.Find("timezone.gtzip").Text("Zonetime.Text")= zonetime.ToString("H:mm")
   oldlocation = location
 end if 

sleep(250)
loop



the script is stopping due to error line 19 conversion from string "" to type 'Integer' is not valid please assit me in correcting it to be able to use this wonderful script
doggy  
#8 Posted : Tuesday, August 27, 2024 8:20:36 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MazajMusic Go to Quoted Post


the script is stopping due to error line 19 conversion from string "" to type 'Integer' is not valid please assit me in correcting it to be able to use this wonderful script



The script work totally fine (if there is a proper value in the title's timedif text field !, see comments at beginning of the script)
MazajMusic  
#9 Posted : Tuesday, August 27, 2024 3:19:57 PM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


the script is stopping due to error line 19 conversion from string "" to type 'Integer' is not valid please assit me in correcting it to be able to use this wonderful script



The script work totally fine (if there is a proper value in the title's timedif text field !, see comments at beginning of the script)


thank you for your reply but I am not seeing what is the issue and why I am getting this error if it is working fine what did i do wrong? any suggestions?
doggy  
#10 Posted : Tuesday, August 27, 2024 4:42:30 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MazajMusic Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


the script is stopping due to error line 19 conversion from string "" to type 'Integer' is not valid please assit me in correcting it to be able to use this wonderful script



The script work totally fine (if there is a proper value in the title's timedif text field !, see comments at beginning of the script)


thank you for your reply but I am not seeing what is the issue and why I am getting this error if it is working fine what did i do wrong? any suggestions?


The "timedif" text field in the used title needs to have a value , can not be empty and must be a integer number
The error indicates that this text field in your title is empty or doesnt have a integer value within
With the script it gets populated by the datasource (as per structure example) , see vMix video tutorials on how to create titles and put data into them to display, using datasources and use them to populate titles etc

Question is are you using a properly structured title and datasource each filled with proper content?

Car will run just fine with the proper fuel in it
MazajMusic  
#11 Posted : Wednesday, August 28, 2024 11:47:36 PM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


the script is stopping due to error line 19 conversion from string "" to type 'Integer' is not valid please assit me in correcting it to be able to use this wonderful script



The script work totally fine (if there is a proper value in the title's timedif text field !, see comments at beginning of the script)


thank you for your reply but I am not seeing what is the issue and why I am getting this error if it is working fine what did i do wrong? any suggestions?


The "timedif" text field in the used title needs to have a value , can not be empty and must be a integer number
The error indicates that this text field in your title is empty or doesnt have a integer value within
With the script it gets populated by the datasource (as per structure example) , see vMix video tutorials on how to create titles and put data into them to display, using datasources and use them to populate titles etc

Question is are you using a properly structured title and datasource each filled with proper content?

Car will run just fine with the proper fuel in it


thank you so much for your help it worked just fine but the only issue i am facing now that the script stops after few hours and I have to click start again is there anything i can do to make it run without stopping and the need to restart it?
doggy  
#12 Posted : Thursday, August 29, 2024 2:17:39 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MazajMusic Go to Quoted Post


thank you so much for your help it worked just fine but the only issue i am facing now that the script stops after few hours and I have to click start again is there anything i can do to make it run without stopping and the need to restart it?


Hard to know the casue if ther is no erro mentioned.
Maybe the frequency of checkig within the script might be a casue (to quick)
MazajMusic  
#13 Posted : Thursday, August 29, 2024 4:47:54 AM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


thank you so much for your help it worked just fine but the only issue i am facing now that the script stops after few hours and I have to click start again is there anything i can do to make it run without stopping and the need to restart it?


Hard to know the casue if ther is no erro mentioned.
Maybe the frequency of checkig within the script might be a casue (to quick)


yes this is hard especially it is working just fine so i am wondering why it is stopped very few hours so i have to go to scripting section in vmix and click start i didn't change anything in the script i am using it as it
MazajMusic  
#14 Posted : Friday, August 30, 2024 2:13:06 AM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


thank you so much for your help it worked just fine but the only issue i am facing now that the script stops after few hours and I have to click start again is there anything i can do to make it run without stopping and the need to restart it?


Hard to know the casue if ther is no erro mentioned.
Maybe the frequency of checkig within the script might be a casue (to quick)


hello again i found it when we reload the title the script stops and needs to be started again so i decided to tell it to you in case anyone face this issue same as me so whenever we reload the title we have to start again the script
doggy  
#15 Posted : Friday, August 30, 2024 2:28:19 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MazajMusic Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


thank you so much for your help it worked just fine but the only issue i am facing now that the script stops after few hours and I have to click start again is there anything i can do to make it run without stopping and the need to restart it?


Hard to know the casue if ther is no erro mentioned.
Maybe the frequency of checkig within the script might be a casue (to quick)


hello again i found it when we reload the title the script stops and needs to be started again so i decided to tell it to you in case anyone face this issue same as me so whenever we reload the title we have to start again the script


That's normal as during the reload the script goes iinto error as it cant reference that input at that moment anymore

What's the reason to reload the title in the first place ?

if you really have to have a shortcut ready to start this script then
MazajMusic  
#16 Posted : Friday, August 30, 2024 4:11:09 AM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post


thank you so much for your help it worked just fine but the only issue i am facing now that the script stops after few hours and I have to click start again is there anything i can do to make it run without stopping and the need to restart it?


Hard to know the casue if ther is no erro mentioned.
Maybe the frequency of checkig within the script might be a casue (to quick)


hello again i found it when we reload the title the script stops and needs to be started again so i decided to tell it to you in case anyone face this issue same as me so whenever we reload the title we have to start again the script


That's normal as during the reload the script goes iinto error as it cant reference that input at that moment anymore

What's the reason to reload the title in the first place ?

if you really have to have a shortcut ready to start this script then


i am using it with a news ticker so when we update the news we need to reload
doggy  
#17 Posted : Friday, August 30, 2024 4:34:55 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MazajMusic Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post

That's normal as during the reload the script goes iinto error as it cant reference that input at that moment anymore

What's the reason to reload the title in the first place ?

if you really have to have a shortcut ready to start this script then


i am using it with a news ticker so when we update the news we need to reload


No you dont, just change the text that needs to go into the ticker (manually, preset or datasource)

Please do a search on how to change title content (including tickers) . There are plenty of videos about that to be found, especially from vMix itself
MazajMusic  
#18 Posted : Friday, August 30, 2024 5:49:39 AM(UTC)
MazajMusic

Rank: Newbie

Groups: Registered
Joined: 8/27/2024(UTC)
Posts: 7
Lebanon

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: MazajMusic Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post

That's normal as during the reload the script goes iinto error as it cant reference that input at that moment anymore

What's the reason to reload the title in the first place ?

if you really have to have a shortcut ready to start this script then


i am using it with a news ticker so when we update the news we need to reload


No you dont, just change the text that needs to go into the ticker (manually, preset or datasource)

Please do a search on how to change title content (including tickers) . There are plenty of videos about that to be found, especially from vMix itself


yes i do that but it doesn't update unless I reload i do not touch the ticker itself i update news in a csv file and save it but the ticker doesn't update the new news in the file unless it is reloaded so i guess i have to search about it to see why it is not updating from the csv without reload thx anyway
Users browsing this topic
Guest
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.