sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #05334
Re: [Question #171331]: how can i replay the 1st loop automatically if the 2nd loop is finished?
Question #171331 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/171331
Dude posted a new comment:
Hi , if am not wrong
According to my understanding
U can put your code inside a function and call it
like:
def function1():
while not exists(manster): #(this 1st loop wont replay if the 2nd loop is finish...)
if exists(hemp):
click(hemp)
if exists(gather):
click(gather)
if exists(lvlup):
click(lvlup)
if exists(manster):
continue
def function2():
while exists(manster):
if exists(ready):
click(ready)
if not exists(gobs):
click(iop)
if exists(lock):
click(lock)
if exists(gobs):
click(turn)
if exists(fnsh):
click(fnsh)
function1()
Note:
In your first loop , u r checking for the condition while not exists(manster):. So when manster is not there , then only it will go inside this loop. Then why are adding this command at last if exists(manster):continue. How do u except manster to exists. this condition will fail
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.