[request] use wait with multiple images in findBest() before returning none --- fixed in 2.0.5

Asked by Chetan on 2021-02-18

tracked on GitHub: https://github.com/RaiMan/SikuliX1/issues/422
---------------------------------------------------------------------

Hi
i am using findBest to find from a list of image .
however i wish to wait before none is returned or image is found
similar to
wait(image,10)
find(image)
#wait 10 seconds before image is seen

is there a direct way to achive this?can i pass multiple images to wait?

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2021-02-18
Last reply:
2021-02-18
RaiMan (raimund-hocke) said : #1

I can implement a waitAny(time, images...) and a waitBest(time, images...) in 2.0.5

How to interpret the wait time one can think of two variants:
- return on first match (behaviour like wait/exists)
- return the matches only after the given time has elapsed

For usages like resolution checks the first variant seems the right one, since no other matches will be found.

The second variant is more like collect all within the given time.

What do you think?

Chetan (cshamdas) said : #2

First of all Raiman Thanks for your help and always being so proactive
now regarding the issue. first behaiour seem better return on first match (behaviour like wait/exists)

it would be great if we can implement it in upcoming 2.0.5

RaiMan (raimund-hocke) said : #3

ok, thanks for feedback.

will be available in 2.0.5 in 1st variant (like wait())

the request will be tracked on gitHub