← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #181852]: if statements inside for loop

 

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

    Status: Open => Answered

Mikeldi Latorre proposed the following answer:
why don't you try to program in more than one line??? You'll have you
code much more legible:

for entry in myListFixed:
    while exists(Pattern("1322634310829.png").similar(0.90).targetOffset(-2,1), 0):
        click("DDCCY.png")
        type(Key.DOWN)
        type("c", KEY_CTRL)
        click("img-1.png")
        exists("Coumry.png")
        doubleClick("Coumry-1.png")
        type("v", KEY_CTRL)
        if exists("Gen-1.png"):
            click("GenP.png")
            click("OpenPage-2.png")
            click("Administrato.png")

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