hasNext() question

Asked by kim

with findAll(image) as tt:
    while tt.hasNext():
        t = tt.next()
        t1 = capture(t.getX(), t.getY(), t.getW(), t.getH())
        click(t1)
        wait(1)

i would like to find all match the image and click it, but it just click 1,2 image, i have more than one match reg,i think it can not find next image. pls help....

Question information

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

try this:

m = findAll(image)
while m.hasNext():
    click(m.next())
    wait(1)

Revision history for this message
kim (plmokn9003) said :
#2

Thanks RaiMan, that solved my question.