Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
Hi.
How to make a script that works like this: if data changes in the Data Source JSON file, 1 row in both columns, run the graphic, it should be in front for 20 seconds and the graphic disappears, and every time like this.
Thank you for all your help :)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: NSCPro Hi.
How to make a script that works like this: if data changes in the Data Source JSON file, 1 row in both columns, run the graphic, it should be in front for 20 seconds and the graphic disappears, and every time like this.
Thank you for all your help :) One can actually "program" the animation for that within a GT title itself (fixed delay time) else plenty of script examples (scripting for dummies post) on how to read title content (change) of a textblock and do some action (titleBeginAnimation) based on that
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
I don’t find where i get correct code..if JSON data change automatically start title graphics
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: NSCPro I don’t find where i get correct code..if JSON data change automatically start title graphics if one uses a datasource ( be it json, xml, csv, ....) it is to link it to a title , one reads the content within the title and checks for a change there (script) same principle example here (reading through the API XML or using the input.find() function for title textblock content https://forums.vmix.com/...ng-for-Dummies#post71124https://forums.vmix.com/...ng-for-Dummies#post80518Can not expect to find an exact match for a personal goal but post contains some "tools/examples" to start from for creating your own "How to make a script that works like ... "
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
I make change in code. Overlay coming in and show Artist name and coming out too, but if song changes in JSON file. Graphics not comes up again. What i do wrong in this code
'Kena Raadio Data Source
dim Titlename as string = "TrackInfo" dim DataTableName as string = "Kena Raadio" dim oldartistname as string = "0" dim PAUSE As integer = 20000
dim ArtistName as string = ""
' put title in overlay 3 API.Function("OverlayInput3In",Input:=Titlename) Sleep(500)
API.Function("DataSourceSelectRow",Value:=DataTableName & ",0")
Do While True ArtistName = Input.Find("Titlename").Text("ArtistName.text") If not ArtistName = oldartistname API.Function("OverlayInput3In", Input:="3") API.Function("SetText",Input:=Titlename,SelectedName:=ArtistName & ".Text",Value:="") sleep(PAUSE) API.Function("OverlayInput3Out") oldartistname = ArtistName end if Sleep(500) Loop
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/23/2020(UTC) Posts: 170 Location: Wichita Thanks: 10 times Was thanked: 24 time(s) in 20 post(s)
|
Originally Posted by: NSCPro I make change in code. Overlay coming in and show Artist name and coming out too, but if song changes in JSON file. Graphics not comes up again. What i do wrong in this code ...
Try: Code:
'Kena Raadio Data Source
dim Titlename as string = "TrackInfo"
dim DataTableName as string = "Kena Raadio"
dim oldartistname as string = "0"
dim PAUSE As integer = 20000
dim ArtistName as string = ""
' put title in overlay 3
API.Function("OverlayInput3In",Input:=Titlename)
Do While True
API.Function("DataSourceSelectRow",Value:=DataTableName & ",0")
ArtistName = Input.Find("Titlename").Text("ArtistName.text")
If not ArtistName = oldartistname
API.Function("SetText",Input:=Titlename,SelectedName:=ArtistName & ".Text",Value:="")
API.Function("OverlayInput3In", Input:="3")
sleep(PAUSE)
API.Function("OverlayInput3Out")
oldartistname = ArtistName
end if
Sleep(1000)
Loop
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
This doesn’t work..I don’t know how this must be work :( If I add this line only in code Code:
dim Titlename as string = "TrackInfo"
dim DataTableName as string = "Kena Raadio"
dim ArtistName as string = ""
ArtistName = Input.Find("Titlename").Text("ArtistName.text")
Console.WriteLine(ArtistName)
Console show nothing, but must be show data
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: NSCPro This doesn’t work..I don’t know how this must be work :( If I add this line only in code Code:
dim Titlename as string = "TrackInfo"
dim DataTableName as string = "Kena Raadio"
dim ArtistName as string = ""
ArtistName = Input.Find("Titlename").Text("ArtistName.text")
Console.WriteLine(ArtistName)
Console show nothing, but must be show data are those the correct names for your datasource, titlename and textblock names ? Code:'Kena Raadio Data Source
dim Titlename as string = "TrackInfo"
dim DataTableName as string = "Kena Raadio"
dim oldartistname as string = "0"
dim PAUSE As integer = 20000
dim ArtistName as string = ""
Do While True
ArtistName = Input.Find(Titlename).Text("ArtistName.text")
If not ArtistName = oldartistname
API.Function("OverlayInput3In", Input:=Titlename)
sleep(PAUSE)
API.Function("OverlayInput3Out")
oldartistname = ArtistName
end if
Sleep(1000)
Loop
or just build it into a title , no script needed Screenshot 2023-12-06 192851.jpg (172kb) downloaded 6 time(s).
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/19/2015(UTC) Posts: 30 Location: Netherlands Thanks: 1 times Was thanked: 3 time(s) in 3 post(s)
|
Cool, didn't this was possible. I was able to recreate your example. As soon as i change the title via webinterface, the title is activated. Let' see if uploading an example is possible: Autotransition on change title.gtzip (8kb) downloaded 8 time(s).
|
|
|
|
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