Question #268536 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/268536

    Status: Open => Answered

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",1)
    mycontinue=region.exists("continue.png",1)    
    if myattack is not None:
        myattack.click()       
    elif mycontinue is not None:
        mycontinue.click()
    else:
        myrestart=region.exists("restart.png",1)
        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.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to