sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12949
Re: [Question #207708]: How do i loop import?
Question #207708 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/207708
Status: Open => Answered
RaiMan proposed the following answer:
What you are doing is recursive calls of the same stuff, which does not
make any sense.
The import/reload repeats the script from the beginning without
terminating the current one.
AND: DO NOT use .skl, just stay with .sikuli
so if you want to repeat the stuff 3 times:
for n in range(3):
type("d",KEY_WIN)
doubleClick(wait("shortcut.png",FOREVER))
wait("A.png",FOREVER)
click("OK.png")
doubleClick("close.png")
since you are using FOREVER as wait time, the script will only continue at these lines, if the image appears at all. Otherwise it will just hang endless and has to be killed.
So
if exists("A.png",FOREVER):
does not make any sense, so I changes it like above.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.