Can I prevent Sikuli from clicking two times the same spot?

Asked by Deses

I have a pattern that is repeated 4 times in the screen.

I want to click them all but Sikuli usually just ends clicking two consecutively...

What I would do is store the Match objects and if they are the same, don't click and keep looking, but I'm afraid that would be the same as above, moving the cursor back and forth without clicking.

There is any solution to this?

Question information

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

http://sikuli.org/docx/match.html#iteratingmatches
Iterating over Matches after findAll()

A find operation Region.findAll() returns an iterator object that can be used to fetch all found matches as match objects one by one. A reference to the iterator is stored in the respective region and can be accessed using Region.getLastMatches().
...

Please read information from link and then related. I think it looks like what you are looking for.

Revision history for this message
Deses (deses12) said :
#2

That's definitely what I need.

Thanks a lot! :D

Revision history for this message
Deses (deses12) said :
#3

Thanks Roman Podolyan, that solved my question.