So I want to capture one image, image s, which is always in the same region. It then disappears and may or may not re-appear in a different region.
I would like the program to capture the first time it appears and if it re-appears in the other region, then click a set of buttons otherwise move to a different function.
The other thing is image s changes each time the function is called but it remains in the same location.
Below is my code:
def playLoop():
s = capture(firstRegion)
warnBox = exists("1443867801301.png")
if not warnBox:
if exists("1443867813008.png"):
click(x)
playLoop()
else:
if secondRegion.exists(Pattern(s).similar(0.8)):
wait(3)
click(x)
playLoop()
else:
loopLoop()
else:
doubleClick(y)
if secondRegion.exists(Pattern(s).similar(0.8)):
wait(3)
click(x)
playLoop()
else:
loopLoop()
I get no errors, however it doesn't seem to work. Any ideas?