← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #667831]: Check for 2 images in 1 region

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
more verbose but clearer:

while True:
   if REGION.exists(img1, 0) or REGION.exists(img2, 0): break
   wait(0.5)
type(Key.F8)

For such situations it is vital to use exists(img, 0): the waittime 0
tells exists() to not wait 3 seconds (the standard) but come back after
the first search try (which depending on the sizes might only be some 10
milliseconds)

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