← Back to team overview

sikuli-driver team mailing list archive

[Question #265063]: Manipulate the counter in for loop

 

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

I would like to know if it is possible to manipulate the counter in a for loop. Let me use an example : 

repeat=5
for i in range(0,repeat):
    DoSomeStuff()
    if exists(IMAGE):
        repeat=repeat+2   # I want my loop to run 2 more times than originally planned


The above was my initial idea, but it doesn't work. The loop stops at the original "repeat" times.

So, is there a way to "extend" (or manipulate) the times a loop is run?

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