sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33339
Re: [Question #268536]: image click on multiple appearances
Question #268536 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/268536
Eugene Maslov proposed the following answer:
Hi Alias,
I suggest, using observe functions is better in your case:
===8<===
myGame=Region(0,0,800,600)
def myChange(event, region=myGame):
myattack=region.exists("attack.png",0)
mycontinue=region.exists("continue.png",0)
if myattack is not None:
myattack.click()
elif mycontinue is not None:
mycontinue.click()
else:
myrestart=region.exists("restart.png",0)
myrestart.click()
myGame.onChange(50,myChange)
myGame.observe(30,False)
===8<==
For other click logic, modify if-else conditions in myChange procedure.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.