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
NSCPro  
#1 Posted : Thursday, July 25, 2024 3:16:02 AM(UTC)
NSCPro

Rank: Advanced Member

Groups: Registered
Joined: 9/27/2019(UTC)
Posts: 48
Estonia
Location: Kuressaare

Hi.

My JSON url file displays information like "ptxt_e":"7;7;7;7;7;6;6.5;6.5;7;7.5;7;7;6.5;7;7.5;7;7;;" how can I make a script for vmix, so that when a new number is added, no matter how many numbers it already has in a row, it automatically takes the name and club from another JSON url file

if in this example there are 17 numbers in total, then if, for example, 18 numbers are now added, then the name and club behind the 18 order numbers will also be taken from the second JSON file and that it automatically updates the graphics when a new number is created in the JSON url file


Thank you
doggy  
#2 Posted : Thursday, July 25, 2024 4:00:10 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 288 times
Was thanked: 946 time(s) in 781 post(s)
Originally Posted by: NSCPro Go to Quoted Post
Hi.

My JSON url file displays information like "ptxt_e":"7;7;7;7;7;6;6.5;6.5;7;7.5;7;7;6.5;7;7.5;7;7;;" how can I make a script for vmix, so that when a new number is added, no matter how many numbers it already has in a row, it automatically takes the name and club from another JSON url file

if in this example there are 17 numbers in total, then if, for example, 18 numbers are now added, then the name and club behind the 18 order numbers will also be taken from the second JSON file and that it automatically updates the graphics when a new number is created in the JSON url file


Thank you


vMix scripting can not process JSON files
nikosman88  
#3 Posted : Thursday, July 25, 2024 4:17:06 AM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 429
Greece
Location: athens

Thanks: 116 times
Was thanked: 65 time(s) in 61 post(s)
Originally Posted by: NSCPro Go to Quoted Post
Hi.

My JSON url file displays information like "ptxt_e":"7;7;7;7;7;6;6.5;6.5;7;7.5;7;7;6.5;7;7.5;7;7;;" how can I make a script for vmix, so that when a new number is added, no matter how many numbers it already has in a row, it automatically takes the name and club from another JSON url file

if in this example there are 17 numbers in total, then if, for example, 18 numbers are now added, then the name and club behind the 18 order numbers will also be taken from the second JSON file and that it automatically updates the graphics when a new number is created in the JSON url file


Thank you


Hello. Cause you say for graphics. Maybe if you use bitfocus companion you can add a trigger that will watch the variable of the graphics field input (maybe hidden field in the graphics title) and when it changes and maybe combine it with an expression,do an action.
NSCPro  
#4 Posted : Thursday, July 25, 2024 7:12:53 AM(UTC)
NSCPro

Rank: Advanced Member

Groups: Registered
Joined: 9/27/2019(UTC)
Posts: 48
Estonia
Location: Kuressaare

But Data Source read JSON file. If someway using Data Source to make script? Every new number on next line
NSCPro  
#5 Posted : Thursday, July 25, 2024 10:59:45 PM(UTC)
NSCPro

Rank: Advanced Member

Groups: Registered
Joined: 9/27/2019(UTC)
Posts: 48
Estonia
Location: Kuressaare

something like that, but this not correctly
Quote:

' Defineeri muutujaid
dim punktid as string
dim nimetused() as string
dim nimetusedCount as integer
dim punktidArray() as string

' Laadi punktid_e string
punktid = API.Function("DataSourceSelect", value:="Võistleja Tulemus|punktid_e|Value")

' Laadi kõik nimetused ABC2 väljalt
nimetusedCount = CInt(API.Function("DataSourceSelect", value:="Nimetused|ABC2|RowCount"))
ReDim nimetused(nimetusedCount - 1)

for i as integer = 0 to nimetusedCount - 1
nimetused(i) = API.Function("DataSourceSelect", value:="Nimetused|ABC2|Value", row:=i)
next

' Eralda punktid stringist
punktidArray = Split(punktid, ";")

' Tühjenda kõik varem kuvatud andmed
For i as integer = 1 To nimetusedCount
API.Function("SetText", inputName:="Tulemuse Kuvamine", value:="")
Next

' Kuvame punktid ja nimetused
For i as integer = 0 to UBound(punktidArray) - 1
if punktidArray(i) <> "" then
dim currentName as string = nimetused(i)
' Värskenda Text Inputi tekst
API.Function("SetText", inputName:="Tulemuse Kuvamine", value:=currentName)
' Oota mõni hetk, et näidata nimetus
Sleep(1000) ' Kui Sleep ei tööta, proovi selle eemaldamist või asendamist
end if
Next




Screenshot 2024-07-25 at 14.56.36.png (608kb) downloaded 0 time(s). Screenshot 2024-07-25 at 14.55.39.png (1,028kb) downloaded 0 time(s).
Users browsing this topic
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.