← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #678458]: I can't implement the rest of the function.

 

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

Description changed to:
Hello.

I'm trying to add two new lines but they are not being recognized.

The function:

def do(a, b, ab, abc, ef, efg):
    if not (exists(a, 0) and exists(ab, 0)):
        return

    doubleClick(abc)
    start = time.time()

    while exists(ab, 0):
        wait(0.1)

    while time.time() < (start + 3) and exists(a, 0):
        pass

    if exists(a, 0):
        doubleClick(b)
        return

    #to be implemented, it has been ignored by the function/script. 
    #It should be triggered whenever the img5 appears. 
    #just to be clear, the img5 will only exist if the img1 doesn't exist

    if exists(ef, 0): 
        doubleClick(efg)

while True:
    do(a="img1", b="img2", ab="img11", abc="img111", ef="img5", efg="img51")
    do(a="img1", b="img2", ab="img12", abc="img121", ef="img5", efg="img51")

I already tried removing the return, add a new pass, put a new return,
but nothing has been effective.

It's just anything happens, the function is ignoring that part.

Thank you for all your help.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.