← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #644291]: How to get a command to repeat about 10 times

 

Question #644291 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644291

    Status: Open => Answered

Manfred Hampl proposed the following answer:
You seem to have misformatted the input.
Whitespace is significant in Python.
Python groups statements according to the amount of whitespace in front of it.

"count = 1
         while (count < 10):
         click(Pattern("58679475550934.png").targetOffset(-8,-8))
         count = count + 1"
is wrong, it probably has to be
"count = 1
while (count < 10):
         click(Pattern("58679475550934.png").targetOffset(-8,-8))
         count = count + 1"
denoting that the indented lines (click... and count=count+1) are inside the while loop.

Please check with python manuals.

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