← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #186411]: wait 1 or 2 or 3 and loop it

 

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

Dikyy posted a new comment:
Awesome!!! It works!!

now it can scan in 1 region for 2 different images!!! 
but now i have a question! if i will set for 3 images per each region will it slows down my work!? now i see, it is little slower, but more faster than i was...
Now i need to set the infinitely repeat system! any ideas hot to make it easier for me?  with stop key.. hmmm.. 
when i set the while  true: it gives me errors..

And for future, as i see i can't make .exe file for my macros without
making java app?

import shutil
reg1 = Region(195,396,89,45)
reg2 = Region(974,342,62,31)
reg3 = Region(973,704,64,32)
maxWait = 20
start = time.time()
while time.time() - start < maxWait:
  mImg1 = reg1.exists("0000-1.png",0)
  mImg2 = reg2.exists("DUDE-1.png",0)
  mImg3 = reg3.exists("1328027006705.png",0)
  mImg4 = reg1.exists("1328027209449.png",0)
  
if mImg1 or mImg2 or mImg3 or mImg4: break

if not (mImg1 or mImg2 or mImg3 or mImg4):
  popup ("nothing to screen"); exit(1)
else:
    img = capture(SCREEN)
    shutil.move(img, 'c:/test/')

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