← Back to team overview

sikuli-driver team mailing list archive

[Question #223689]: if fail, continue another script, when done, start first again

 

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

first i want to tell that im very new to this. I have only used Sikuli for 3 days, and i have never done anything like this before. so please answer in a easily understood language, if you would be so kind.

i have following script running in sikuli..

for i in range(10):
    click("1362600377681.png")
    wait(1)
    click(Pattern("B.png").targetOffset(167,-100))
    wait("lIm.png",2000)
    click(Pattern("I0.png").targetOffset(60,38))
    click(Pattern("lahIr0lIlMIM.png").targetOffset(2,31))
    click(Pattern("_i.png").targetOffset(-37,-2))
    click("1362601111532.png")
    click(Pattern("B-1.png").targetOffset(381,-95))
    wait("wm.png",2000)
    click(Pattern("lolI.png").targetOffset(59,35))
    click(Pattern("lahhr000MIME.png").targetOffset(7,31))
    click(Pattern("_L.png").targetOffset(-36,-3))
    click("1362601339995.png")
    click(Pattern("B-2.png").targetOffset(604,-91))
    wait("Antalafspill.png",2000)
    wait(1)
    click(Pattern("Antalafspill-1.png").targetOffset(56,36))
    click(Pattern("lahIr0MKOBPL.png").targetOffset(-7,30))
    click(Pattern("_iA.png").targetOffset(-36,0))
    click("1362601653653.png")
    click(Pattern("B-3.png").targetOffset(818,-97))
    wait("llollIlIwmla.png",2000)
    click(Pattern("llol.png").targetOffset(57,33))
    click(Pattern("lahIr0lIliH.png").targetOffset(2,28))
    click(Pattern("1362601791463.png").targetOffset(-36,-1))


if for an exampel, "wait("lIm.png",2000)"  fails, I want it to start on another "script".

it could be like: "wait("lIm.png",2000)". failed
then: click()
          click()
          wait()
          click()
"start from beginning again"

what type of code do i need to use?

I hope you understand my quistion and are able to answer it. 

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