Originally Posted by: MSFTGuruGuy  Hey All! I was curious if anyone has a simple scripting solution to continuously check whether or not a data source is positive and if it's not, take the abs of it and replace the data feed with the abs of that number. I've tried to use 'newnumber = math.abs(oldnumber)' and then using 'API.Function("SetText",Input:=scoreboard , Value:=newballon, SelectedName:="Ballon.Text")' but running that in a continuous script seems to be producing no solution. The Context is I have a scoreboard sending Vmix a JSON data stream in American Football. Depending on field position the ball location, the scoreboard will send a negative number for field position. I've been trying to find the right set of commands to right a script but it seems to evade me. Thanks in advance, and I did look at the scripting for dummies and didn't see any math examples.
Kris
First off spelling and writing commands when scripting(coding) is very important commands to right a script ==> commands to write a script When it comes to a script you don't mention how you are retrieving the value. In vMix scripting using vb.net one usually has to retrieve datasource data through a title (simplest way). Do some logic or conversion on that and like in this case send to your title And put the whole thing in a loop for repeated checking Code:Do While true
Dim text as string = Input.Find("title.gtzip").Text("Headline.Text")
Dim value As Integer = Integer.Parse(text)
Dim abs1 As Integer = Math.Abs(value)
API.Function("SetText",Input:="title.gtzip" , SelectedName:="Description.Text" , Value:=abs1)
Sleep(500)
Loop
' or for short
Do While true
API.Function("SetText",Input:="title.gtzip" , SelectedName:="Description.Text" , Value:=Math.Abs(Integer.Parse(Input.Find("title.gtzip").Text("Headline.Text"))))
Sleep(500)
Loop
|
Hey All! I was curious if anyone has a simple scripting solution to continuously check whether or not a data source is positive and if it's not, take the abs of it and replace the data feed with the abs of that number. I've tried to use 'newnumber = math.abs(oldnumber)' and then using 'API.Function("SetText",Input:=scoreboard , Value:=newballon, SelectedName:="Ballon.Text")' but running that in a continuous script seems to be producing no solution. The Context is I have a scoreboard sending Vmix a JSON data stream in American Football. Depending on field position the ball location, the scoreboard will send a negative number for field position. I've been trying to find the right set of commands to right a script but it seems to evade me. Thanks in advance, and I did look at the scripting for dummies and didn't see any math examples.
Kris
|
Originally Posted by: Wade  This is a live sport setting - I have an animated score bug. I am adding the clock via a camera shooting the scoreboard. (The company is not willing to spend money on anything else) I need the camera to be delayed for about a second in order for the animation to finish. The camera is a part of the score bug via the multiview function. I've tried triggers to delay it coming in, but nothing has worked. I know I could bring the camera in as another overlay, but during the game I have other things going on with all of the overlays - so I do not want to use an overlay just for this purpose. Any ideas? This will work with a delay in an OnOverlayIn trigger on the scorebug input and the LayerOn function (combined with OnOverlayOut and LayerOff). What have you tried so far?
|
Originally Posted by: Wade  This is a live sport setting - I have an animated score bug. I am adding the clock via a camera shooting the scoreboard. (The company is not willing to spend money on anything else) I need the camera to be delayed for about a second in order for the animation to finish. The camera is a part of the score bug via the multiview function. I've tried triggers to delay it coming in, but nothing has worked. I know I could bring the camera in as another overlay, but during the game I have other things going on with all of the overlays - so I do not want to use an overlay just for this purpose. Any ideas? have you tried "video delay" input ? also a camera input has a (in advanced) delay setting
|
This is a live sport setting - I have an animated score bug. I am adding the clock via a camera shooting the scoreboard. (The company is not willing to spend money on anything else) I need the camera to be delayed for about a second in order for the animation to finish. The camera is a part of the score bug via the multiview function. I've tried triggers to delay it coming in, but nothing has worked. I know I could bring the camera in as another overlay, but during the game I have other things going on with all of the overlays - so I do not want to use an overlay just for this purpose. Any ideas?
|
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close