sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #31815
[Bug 1445940] Re: [1.0.1] Finder: seems to only find one match
ok, checked again and looked into the code:
this is simply a doc-bug.
with version 1.1.0 I changed the behaviour and the API, to be consistent with the Region.find()/findAll():
Finder.find() by intention only finds one match and then returns.
Finder.findAll()
does what you expect.
the example should look like this:
f = Finder("stars.png")
img = "star.png"
f.findAll(img)
mm = []
while f.hasNext():
mm.append(f.next())
f.destroy()
print len(mm)
for m in mm:
print m
** Summary changed:
- [1.0.1] Finder: seems to only find one match
+ [1.0.1] Finder.find(): only finds one match --- use Finder.findAll() to find more than one
** Description changed:
+ ---------- problem
+
+ the docs are not showing the API and behaviour with 1.1.0
+
+ ----------------------------------------------------------
+
I am using Sikulix 1.1.0 (2015-01-16_01:00nightly) on win 7
I try to implement the codes on example 2 of http://doc.sikuli.org/finder.html
f = Finder("stars.png")
img = "star.png"
f.find(img)
mm = []
while f.hasNext():
- mm.append(f.next())
+ mm.append(f.next())
print f.hasNext()
f.destroy()
print len(mm)
for m in mm:
- print m
+ print m
The result is supposed to be 5 matches. However, I only get
1
M[30,32 23x23]@S(S(0)[0,0 1920x1080]) S:1.00 C:41,43 [0/0 msec]
Please help.
Thanks.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1445940
Title:
[1.0.1] Finder.find(): only finds one match --- use Finder.findAll()
to find more than one
Status in Sikuli:
Fix Committed
Bug description:
---------- problem
the docs are not showing the API and behaviour with 1.1.0
----------------------------------------------------------
I am using Sikulix 1.1.0 (2015-01-16_01:00nightly) on win 7
I try to implement the codes on example 2 of http://doc.sikuli.org/finder.html
f = Finder("stars.png")
img = "star.png"
f.find(img)
mm = []
while f.hasNext():
mm.append(f.next())
print f.hasNext()
f.destroy()
print len(mm)
for m in mm:
print m
The result is supposed to be 5 matches. However, I only get
1
M[30,32 23x23]@S(S(0)[0,0 1920x1080]) S:1.00 C:41,43 [0/0 msec]
Please help.
Thanks.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1445940/+subscriptions
References