Originally Posted by: doggy Originally Posted by: Salleman
Duable?
Sure is doable but maybe also time to learn a little bit yourself ( see previous link)
Code:
dim oldresult as string = "0"
dim G1result as string = ""
do while true
G1result = Input.Find("Goal-Pling").Text("G1Result.text") 'get current score
if not G1result = oldresult ' check if score has changed
'do your layer2In
'do your plingy thingy or use the trigger
sleep(5000) 'wait 5 seconds
'do your layer2Out
oldresult = G1result 'save the new score
end if
sleep(500) 'lets not check again to quickly
loop
Hi again, sorry to need to ask again.
When I start the script it seems to work fine and the "overlay2" is lightning up and play "pling" as i should and shuts of layer2 after 5 sec as scripted.
But it seems not recognize any data change when the goals keep coming in.
Could you please see if I missed something in the code?
*********
dim oldresult as string = "0"
dim G1Result as string = ""
do while true
G1Result = Input.Find("MATCH-PLING1").Text("G1Result.text") 'get current score
if not G1Result = oldresult 'check if score has changed
API.Function("OverlayInput2In", Input:="59") 'do your layer2In
'do your plingy thingy or use the trigger
sleep(5000) 'wait 5 seconds
API.Function("OverlayInput2Out") 'do your layer2Out
oldresult = G1Result 'save the new score
end if
sleep(500) 'lets not check again to quickly
loop
***********
On Input number 60 named "MATCH-PLING1" built on GT "goal-plingg1.gtzip" I have in Title Editor "G1Result.TEXT" getting data from a Google Spreadsheet.
If I manually light up Overlay2 and change the score in spreadsheet the Title shows for 4 seconds and then disappears as planned.
But if I leave the Overlay2 Off, the datachange do not activate the On and Off och Layer2.
The Input needed to use Layer2 is Input 59 where Input 60 is one of 7 multilayers.
But as I wrote the script when I started to do exactly this and lights up Layer2 on Input 59 so that part works, but not the DataChangeIn function later on.
Any suggestions?
Absolutly, I dive in to this soon.
Thx for code