sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #47597
Re: [Question #670183]: Count the number of pictures
Question #670183 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670183
Status: Answered => Open
Ju1+i-我. is still having a problem:
thx for your answer ,
public int getsizeofIterator(Iterator<Match> a) {
int count = 0;
if (null != a && a.hasNext()) {
while (a.hasNext()) {
a.next()
count++;
}
}
return count;
}
Pattern st = new Pattern(s1.prop("sm378")).similar((float) 0.99);
if (s.exists(s1.prop("sm37")) != null) {
System.out.println("Blank");
}
else{
int count = 0;
while (true) {
if (s.exists(st) != null) {
s.wait(0.5);
Iterator<Match> a = s.findAll(s1.prop("sm378"));
count = count + fu.getsizeofIterator(a);
}
else{
count = count + 0;
}
if (s.exists(s1.prop("sm379")) != null) {
break;
}
else {
s.type(Key.F11,Key.SHIFT);
}
}
i used this , but result is not ideal . the actual number is 2, but the result of the execution is 10, could you please help to look further ?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.