[1.0.1] findAllNow method unknown... --- no longer available (makes no sense)

Asked by Greg83140

Hi,

i just installed the sikuli-setup.jar on my computer and I would like to use thse region method "findAllNow" but the method is not include on this jar althougt the description of the method is define here : http://doc.sikuli.org/javadoc/org/sikuli/script/Region.html
(and it's not deprecated)

Could you please tell me how could I get this method ?
Thanks
Greg

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Greg83140
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

The JavaDocs mentioned are out of date - sorry for that.

I have purged findAllNow() since it makes no sense:

If you use findAll() instead, you get the same behaviour and result:
If the target is already on the screen, the search will come back after the first search round with the found matches.

Otherwise, it will wait until at least one target gets visible and come back with the found matches, or throw FindFailed if timeout.

A findAll() is not recommended to find out, wether at least one target is visible. use exists() instead:

# at the script level:
if exists(target, 0):
    matches = list(findAll(target))
else:
    print "does not make sense to use findAll() - target not visible currently"

Revision history for this message
Greg83140 (ggrergg) said :
#2

Thank you raiman,

that solve my problem.