← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #268710]: Trap Error

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
if I understand right:

--- use exists() for searching images:

def something_1():
    if exists(someImage):
        # do something
        return 0
    else:
       return 1  

... and more of these

def This_Is_Main()
     failures = 0
     failures += something_1()
     failures += something_2()
     failures += something_3()
     failures += something_4()
     failures += something_5()
     return failures

shouldRepeat = True
counter = 0
while shouldRepeat:
     shouldRepeat = 0 < This_Is_Main()
     counter += 1
     if counter == 3:
        break

... or if I did not understand right: these are the building blocks to
do whatever you want

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