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

    Status: Open => Answered

RaiMan proposed the following answer:
I would do it this way: (there are some typos I guess:         ...
=screen(0)         ...reenObject.Find(....


screenObject=Screen(0)

m = screenObject.exists("imgA")
if not m: exit(0)
x = m.left(50)

if x.exists("img B"): click(x.getLastmatch())
elif x.exists("img C"): click(x.getLastmatch())

since 
screenObject=Screen(0)
is not really needed:

m = exists("imgA")
if not m: exit(0)
x = m.left(50)
if x.exists("img B"): click(x.getLastmatch())
elif x.exists("img C"): click(x.getLastmatch())

I never work with try/except for FindFailed and these special  
setFindFailedResponse() stuff.
It is somehow weird and makes the scripts messy.
exists() is the best we have ;-)

-- 
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     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to