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
hadi_753  
#1 Posted : Thursday, July 21, 2016 8:36:21 AM(UTC)
hadi_753

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 .
hadi_753  
#2 Posted : Thursday, July 21, 2016 9:18:19 AM(UTC)
hadi_753

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 .
admin  
#3 Posted : Friday, July 22, 2016 9:10:11 PM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 5,211
Man
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
hadi_753  
#4 Posted : Saturday, July 23, 2016 6:27:23 AM(UTC)
hadi_753

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
Users browsing this topic
Guest (2)
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.