← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #233903]: image not reconized in while loop

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
-- 1: a pythonized ;-) and streamline version:

patterns = [Pattern("LeftforeLeft.png").targetOffset(-90,-144),
    Pattern("LeftforeLeft-1.png").targetOffset(-90,-113),
    Pattern("LeftforeLeft-2.png").targetOffset(-90,-80),
    Pattern("LeftforeLeft-3.png").targetOffset(-90,-51),
    Pattern("LeftforeLeft-4.png").targetOffset(-90,-17),
    Pattern("Leftforeleft-5.png").targetOffset(-90,16),    
    Pattern("Leftforeleft-6.png").targetOffset(-91,49),
    Pattern("Leftforeleft-7.png").targetOffset(-90,82),
    Pattern("leftforeleft-10.png").targetOffset(-90,114),
    Pattern("Leftforeleft-9.png").targetOffset(-92,147)]

for n in range(len(patterns)):
    print n
    wait(patterns[n], 7)
    click(wait(patterns[n], 7))
    click(wait("Copture.png", 4))
    if exists("Ok-4.png", 8):
        click(getLastMatch())
        wait(2)
    else:
        print "Success"
        wait(10)

-- your problem
I cannot judge without a screenshot and the images.
So if you like: zip the script and a screenshot together and send it silently to my mail at https://launchpad.net/~raimund-hocke

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