Clicking after Region.findAny?

Asked by Jasper

So as the title says, I am trying to click after a Region.findAny but alas I cannot get it to work.
I've read a bit of the documentation and which didn't help me unfortunately, so if anyone can help me with this simple issue it'd be much appreciated!

Here is my part of the code I'm struggling with:
while True:

   if region1.exists(img1,0): - waiting for an image to appear before searching for other 3 images that are on screen already, but change colors at times.
I've tried other methods to get this to work as well but to no luck - the only way I can have this work right now by using a or statement region.2click(img1) or ect ect. Which is slower and not preferable. I'd also like to note that I can get sikuli to click after findAny, but it won't actually click on the images of course.

tl;dr I think I'm not properly using the getlastmatches() and I do not know how to implement that into the click function.

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :

You can understand your issue when you confirm return value of getLastMatch.

r = Region(0,0,400,400)
print r.getLastMatch()

r = Region(0,0,400,400)
mlist = r.findAny("1609040733533.png","1609040739663.png","1609040747454.png")
print mlist
print r.getLastMatch()
for m in mlist:

Can you help with this problem?

Provide an answer of your own, or ask Jasper for more information if necessary.

To post a message you must log in.