← Back to team overview

sikuli-driver team mailing list archive

[Question #255242]: Why is my loop failing?

 

New question #255242 on Sikuli:
https://answers.launchpad.net/sikuli/+question/255242

Apologies if this is basic Python but I am not sure why my loop is failing in Sikuli,  I get the error 

"[error] Error message: SyntaxError: ("mismatched input '' expecting EOF", ('C:\\Users\\Barry\\AppData\\Local\\Temp\\sikuli-tmp2380907044371856896.py', 3, 4, ' for n in range(200):\n'))"

however that loop code at the top works in other scripts.


My Code is as Follows:


Settings.MoveMouseDelay = 1

    for n in range(200):
        if exists("1406144397515-1.png"):
            click("1406144397515-1.png")
            hover("1406214711706-1.png")
            mouseDown(Button.LEFT)
            wait(3)
            hover("rhSelect-1.png")
            click("1406147277952-1.png")
            mouseDown(Button.LEFT)
            mouseUp(Button.LEFT)
            wait(1)
            click("Upgrmg_i-1.png")
            wait(1)
            click("1406148755055-1.png")
            wait(2)
            hover("1406190237343-1.png")
            dragDrop("1406190237343-1.png", "j-1.png")
            click("1406190552325-1.png")
            wait(16)
            click("CcllaccRewar-1.png")
        
        else if exists("Llpgr_ing0wm.png"):
            click("Llpgr_ing0wm.png")
            click("1406148755055-1.png")
        else:
            sleep(5)
        
wait(2)

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