← Back to team overview

sikuli-driver team mailing list archive

[Question #273614]: Go to line in script

 

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

I have a very basic understanding so please take that into account if you can help :)

I have this code:


if exists(Pattern("1446404562207.png").exact()):
   type("w",KEY_CTRL)
else: 
 click(Pattern("1446404655642.png").exact().targetOffset(-186,-2))
click(Pattern("1446404964069.png").exact())
wait(Pattern("1446404996477.png").similar(0.40).targetOffset(204,47),FOREVER)
click(Pattern("1446404996477.png").similar(0.40).targetOffset(204,47))
type("w",KEY_CTRL)

What i would like it to do is go back to line 1 or 2 or 3 etc of my code so that the script repeats itself and then goes in  a cycle.

For example...

if exists(Pattern("1446404562207.png").exact()):
   type("w",KEY_CTRL)

GO TO LINE 1 OF SCRIPT

else: 
 click(Pattern("1446404655642.png").exact().targetOffset(-186,-2))
click(Pattern("1446404964069.png").exact())
wait(Pattern("1446404996477.png").similar(0.40).targetOffset(204,47),FOREVER)
click(Pattern("1446404996477.png").similar(0.40).targetOffset(204,47))
type("w",KEY_CTRL)

GO TO LINE 2 OF SCRIPT

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