sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #08623
Re: [Question #186639]: Can't Figure loop!
Question #186639 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/186639
Status: Open => Answered
RaiMan proposed the following answer:
No, not really simple, but makable ;-)
import shutil
reg1 = Region(194,392,179,103)
start = time.time()
end = start+60
while True:
mImg1 = reg1.exists("DUDE.png",0)
if mImg1:
img = capture(SCREEN)
shutil.move(img, 'c:/test/')
wait(1)
if time.time() > end: break
Now this will max loop 1 minute. During this time it will check about every second, if image exits.
If image exists it makes a screenshot and saves it to c:\test (must exist).
If you want to break the loop, alt-shift-c should make it.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.