Rank: Newbie
Groups: Registered
Joined: 3/4/2019(UTC) Posts: 9 Location: Iowa Thanks: 5 times Was thanked: 3 time(s) in 2 post(s)
|
I beat my head against the wall with this one for a while, so I thought I'd share for anybody else looking to do the same in the future. I wanted my scorebug to say "1st & 10" as opposed to "1 & 10". I accomplished it with the following script. Period.Raw.Text & Down.Raw.Text are hidden inputs that my ScoreIP from Graphics Outfitters feeds into. The script processes that data and spits out the friendly version in the correct title location. Code:
dim i = Input.Find("ccsd football scorebug xaml.gtxml")
Do
dim period
period = i.Text("Period.Raw.Text")
if period = "1"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Period.Text",Value:="1st" )
End IF
if period = "2"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Period.Text",Value:="2nd" )
End IF
if period = "3"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Period.Text",Value:="3rd" )
End IF
if period = "4"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Period.Text",Value:="4th" )
End IF
'--------------------------------------------------------------------------------------------------------------
dim down
down = i.Text("Down.Raw.Text")
if down = "1"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Down.Text",Value:="1st" )
End IF
if down = "2"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Down.Text",Value:="2nd" )
End IF
if down = "3"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Down.Text",Value:="3rd" )
End IF
if down = "4"
API.Function("SetText",Input:="ccsd football scorebug xaml.gtxml",SelectedName:="Down.Text",Value:="4th" )
End IF
Sleep(100)
Loop
withScript.png (2,913kb) downloaded 67 time(s). withoutScript.png (2,947kb) downloaded 45 time(s).
|
2 users thanked ryanlehms for this useful post.
|
|