how to click everytime an image is detected in the screen

Asked by Rox

Hi,

I am new at Sikuli and I need some help for an operation.
I would like to click on an image everytime it is detected in the screen.
I tried:

m=findAll('Image.png')
m= SCREEN.getLastMatches()
while (m.hasNext()):
        click(m)
        m.next()

But it doesn't click anywhere :s
Does m contain a match that can be used with click?

Thanks,
Rox

Question information

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

Thank you RaiMan, it works.
I was not looking at the right documentation (http://doc.sikuli.org/match.html).

Regards,
Rox