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
MSFTGuruGuy  
#1 Posted : Wednesday, May 10, 2023 4:22:49 AM(UTC)
MSFTGuruGuy

Rank: Advanced Member

Groups: Registered
Joined: 5/1/2020(UTC)
Posts: 31
United States
Location: Tennessee

Was thanked: 1 time(s) in 1 post(s)
I can't find the words to refine my search of what I'm trying to accomplish so hoping the forum can help. Is there a simple automation technique to take an XML value and translate that into the visibility change in a title using Vmix 4K. For example: I receive Live XML data from a scoreboard. Possession of ball is denoted by a "." in the XML field. (ie: <Hpos>. ) I'm trying to figure out a simple way to tell Vmix when the home field has the "." value to turn on the possession indicator (make visible) in the custom GT title field I've created, as well as turning it off if it's blank.

TIA

Kris
doggy  
#2 Posted : Wednesday, May 10, 2023 8:19:42 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MSFTGuruGuy Go to Quoted Post
I can't find the words to refine my search of what I'm trying to accomplish so hoping the forum can help. Is there a simple automation technique to take an XML value and translate that into the visibility change in a title using Vmix 4K. For example: I receive Live XML data from a scoreboard. Possession of ball is denoted by a "." in the XML field. (ie: <Hpos>. ) I'm trying to figure out a simple way to tell Vmix when the home field has the "." value to turn on the possession indicator (make visible) in the custom GT title field I've created, as well as turning it off if it's blank.

TIA

Kris


check out the "scripting for dummies" post and find some examples of how to extract what is in a title field and based upon that content do some actions
MSFTGuruGuy  
#3 Posted : Monday, May 22, 2023 12:05:46 AM(UTC)
MSFTGuruGuy

Rank: Advanced Member

Groups: Registered
Joined: 5/1/2020(UTC)
Posts: 31
United States
Location: Tennessee

Was thanked: 1 time(s) in 1 post(s)
I think it might either be that I haven't coded in 20 years, or that I have coded before and over thinking this, but I'm not really finding the right solution in the post let me try again (thanks in advance for the patience).

I have a live XML feed coming off a scoreboard, let's say its location is kept at x:/scoreboard.xml
Ball possession is denoted by a simple "." in either <HomePOS> or <VisitorPOS> section of the XML generated.
I'm trying to build a script that turns an image visibility in title "SCOREBUG" on/off based on who the XML has denoted has possession.

I know I'm overthinking this, but any shortcut help would be fantastic. I think it's writers block. :)

Kris
doggy  
#4 Posted : Monday, May 22, 2023 3:12:39 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MSFTGuruGuy Go to Quoted Post
I think it might either be that I haven't coded in 20 years, or that I have coded before and over thinking this, but I'm not really finding the right solution in the post let me try again (thanks in advance for the patience).

I have a live XML feed coming off a scoreboard, let's say its location is kept at x:/scoreboard.xml
Ball possession is denoted by a simple "." in either <HomePOS> or <VisitorPOS> section of the XML generated.
I'm trying to build a script that turns an image visibility in title "SCOREBUG" on/off based on who the XML has denoted has possession.

I know I'm overthinking this, but any shortcut help would be fantastic. I think it's writers block. :)

Kris


One can use a "invisible" label in the title to read the possession from with a script and then use the option to make the image invisible
If visibility itself is not an option one can use pages in the title triggered by the script as trick for example.

First post of the "scripting for dummies" allready has an example of how to read a value from a title "IMAGENAME = Input.Find("TitleName").Text("Headline.Text)" as example to work from
MSFTGuruGuy  
#5 Posted : Monday, May 22, 2023 3:02:51 PM(UTC)
MSFTGuruGuy

Rank: Advanced Member

Groups: Registered
Joined: 5/1/2020(UTC)
Posts: 31
United States
Location: Tennessee

Was thanked: 1 time(s) in 1 post(s)
Thanks for the direction! Looking back this script is almost taken directly out of another example, but it still isn't working. I don't see an error, just nothing is becoming visible. I have the HPOS and VPOS xml fields mapped to a hidden text field in the title. which is referenced in the variable statement below:

dim ballposs as string = ""
do while true
ballposs = Input.Find("FBSCORELINE").Text("HPOS.text")

If ballposs.Contains(".") Then

API.Function("SetImageVisibleOn",Input:="FBSCORELINE",SelectedName:="Hpossession.Source")
API.Function("SetImageVisibleOff",Input:="FBSCORELINE",SelectedName:="Apossession.Source")
'below line is just for tracking'
Console.writeLine("Home team has possession")

else

API.Function("SetImageVisibleOn",Input:="FBSCORELINE",SelectedName:="Apossession.Source")
API.Function("SetImageVisibleOff",Input:="FBSCORELINE",SelectedName:="Hpossession.Source")
'below line is just for tracking'
Console.writeLine("Away team has possession")

End If
loop
doggy  
#6 Posted : Monday, May 22, 2023 9:11:56 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: MSFTGuruGuy Go to Quoted Post
Thanks for the direction! Looking back this script is almost taken directly out of another example, but it still isn't working. I don't see an error, just nothing is becoming visible. I have the HPOS and VPOS xml fields mapped to a hidden text field in the title. which is referenced in the variable statement below:

dim ballposs as string = ""
do while true
ballposs = Input.Find("FBSCORELINE").Text("HPOS.text")

If ballposs.Contains(".") Then

API.Function("SetImageVisibleOn",Input:="FBSCORELINE",SelectedName:="Hpossession.Source")
API.Function("SetImageVisibleOff",Input:="FBSCORELINE",SelectedName:="Apossession.Source")
'below line is just for tracking'
Console.writeLine("Home team has possession")

else

API.Function("SetImageVisibleOn",Input:="FBSCORELINE",SelectedName:="Apossession.Source")
API.Function("SetImageVisibleOff",Input:="FBSCORELINE",SelectedName:="Hpossession.Source")
'below line is just for tracking'
Console.writeLine("Away team has possession")

End If
loop



pritty sure :
Code:
ballposs = Input.Find("FBSCORELINE").Text("HPOS.text")
should be HPOS.Text -> Text with a capital just like it is within the title

Check to make sure the input name is correct with fileextention if input is called as such

Code:
If ballposs.Contains(".") Then
'or
If ballposs = "." Then
'works too

MSFTGuruGuy  
#7 Posted : Monday, May 22, 2023 10:23:46 PM(UTC)
MSFTGuruGuy

Rank: Advanced Member

Groups: Registered
Joined: 5/1/2020(UTC)
Posts: 31
United States
Location: Tennessee

Was thanked: 1 time(s) in 1 post(s)
Thank you!
The case change in HPOS.Text... didn't seem to change anything but that was a good catch.

ballposs is just a variable it shouldn't have an extension, right?

However, removing the "Contains" element did seem to do the trick!

Thank you again!
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.