vMix Forums
»
General
»
General Discussion
»
Set an image for title through scripting
Rank: Member
Groups: Registered
Joined: 3/26/2016(UTC) Posts: 10
Thanks: 1 times Was thanked: 5 time(s) in 1 post(s)
|
Hi all ,
I think my request is pretty simple .. i'm just a newbie :)
i know how to change text for titles through scripting (vb.net) here is an example :
dim i = Input.Find("SOCORE.xaml") if i.Text("SCORE_1_A") = "2" Then i.Text("SCORE_1_A") = "3"
But my question is how to change the image for a title through scripting ?? i tried something like this but it's not working :
dim i = Input.Find("SOCORE.xaml") if i.Text("SCORE_1_A") = "2" Then i.Image("SELECT_TEAM_B") = "C:\*********\SELECT TEAM WHITE.png"
Any advises ..
Thanks in advance .
|
|
|
|
Rank: Member
Groups: Registered
Joined: 3/26/2016(UTC) Posts: 10
Thanks: 1 times Was thanked: 5 time(s) in 1 post(s)
|
Okay , after deep search , i found a solution for that as following (for anyone who may need it) :
dim i = Input.Find("SOCORE.xaml") if i.Text("SCORE_1_A") = "2" Then API.Function("SetImage", "SOCORE.xaml", "C:\*****\SELECT TEAM WHITE.png", 100, "SELCET_TEAM_B")
New problem arises now , how to get the name of the image assigned to that title (to do if clause on it) ???
Any advise would be highly appreciated .
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/13/2010(UTC) Posts: 5,214 Location: Gold Coast, Australia Was thanked: 4301 time(s) in 1523 post(s)
|
The following example should work: Code:dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim n = x.SelectSingleNode("//input[@title = ""SocialTitle1.xaml""]/image[@name = ""Photo""]")
dim i = Input.Find("SocialTitle1.xaml")
i.Text("Title") = n.InnerText
|
|
|
|
Rank: Member
Groups: Registered
Joined: 3/26/2016(UTC) Posts: 10
Thanks: 1 times Was thanked: 5 time(s) in 1 post(s)
|
Hi Martin ,
Many thanks for your help .
One question regarding the following code :
dim n = x.SelectSingleNode("//input[@title = ""SocialTitle1.xaml""]/image[@name = ""Photo""]")
What shall I replace here with my title details ?
Thanks in advance .
@admin
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Set an image for title through scripting
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