|
Post by yaharga on May 16, 2018 0:39:12 GMT
So if I fail and lose the game, I want to click on (try again). Also, if I won the game, the same screen would show a different image and I would click "continue". Now, I want to set the script to automatically click on either images if one appears, and continue a different set of instructions accordingly. How would I go about doing that?
If I use an if statement with existsClick, or waitVanishes, I can't predict the amount of time it would take to load before either images appear.
|
|
nmax
New Member
Posts: 2
|
Post by nmax on May 16, 2018 4:17:23 GMT
assume you already defined pattern1, pattern2, myRegion: while true do if myRegion:exists(pattern1, 1) then click(myRegion:getLastMatch()) break end if myRegion:exists(pattern2, 1) then click(myRegion:getLastMatch()) break end wait(1) end
|
|
|
Post by yaharga on May 16, 2018 10:21:32 GMT
Forgot about break. Thanks!
|
|