Comment 4 for bug 778925

Revision history for this message
RaiMan (raimund-hocke) wrote :

To make this even more flexible, the Pattern class should have more attributes:

- defaults:
count = 1
waittime = standard-waiting-time

- count
... defines how many images should be searched in one run
setting count = 0 would return as many matches as possible within the given wait time

- waittime
... a specific waittime for this pattern, that should be used with find() (overwritten when using wait())

usage:
p = Pattern("some-image.png").setCount(5).setWait(10)
matches = find(p) # returns a list of matches like findAll()