← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #165137]: Using multiple screenshots inside exists()

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- first question

which = None
while True:
    if exists(button1, 0):
        which = "button1"
        break
    if exists(button2, 0):
        which = "button2"
        break
    wait(1)
if which == "button1":
    print "Found Button 1"
elif which == "button2":
    print "Found Button 2"
else:
    print "should never happen ;-)"

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.