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 , First , huge thanks to Mr. Martin as he helped me coding this scripting .. Here as an example of scoreboard(for table tennis) scripting . The script do the following : In Table Tennis , the every player got 2 services , until they reach 10-10 then every player got one serve . What the script do is to move the dot (white circle showing how got the serve) automatically to the other player every two point until they reach 10-10 , then every player got only one . This is impossible to do without scripting . because the dot (white circle) is an image .aside from the mistakes may happens if you do it manually . Here is the script (if anything not clear , please let me know) : Code:
dim i = Input.Find("SOCORE TENIS.xaml")
dim sum As Integer
sum = Convert.ToInt32(i.Text("SCORE_1_A")) + Convert.ToInt32(i.Text("SCORE_1_B"))
dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim n = x.SelectSingleNode("//input[@title =""SOCORE TENIS.xaml""]/image[@name = ""SELCT_TEAM_A""]")
if sum <> "0" then
if sum < 20 then
if CLng(sum) Mod 2 > 0 Then
else
if n.InnerText = "C:\*******SELECT TEAM WHITE.png" then
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\*******\SELECT TEAM WHITE.png", 100, "SELCT_TEAM_B")
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\*******\SELECT TEAM OUT.png", 100, "SELCT_TEAM_A")
else
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\************\SELECT TEAM WHITE.png", 100, "SELCT_TEAM_A")
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\************\SELECT TEAM OUT.png", 100, "SELCT_TEAM_B")
end if
end if
else
if n.InnerText = "C:\*************\SELECT TEAM WHITE.png" then
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\*****************\SELECT TEAM WHITE.png", 100, "SELCT_TEAM_B")
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\*****************\SELECT TEAM OUT.png", 100, "SELCT_TEAM_A")
else
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\*****************\SELECT TEAM WHITE.png", 100, "SELCT_TEAM_A")
API.Function("SetImage", "SOCORE TENIS.xaml", "C:\******************\SELECT TEAM OUT.png", 100, "SELCT_TEAM_B")
end if
end if
end if
Hope the above code will be helpful for you guys .. Thanks Mr. Martin for the support . Regards ,
|
5 users thanked hadi_753 for this useful post.
|
|