Click All Matches for xClick

Can Kantu click on all image-matched elements using xClick? If so, how do I do this?

If not, any ideas for a work-around?

For Selenium IDE style web automation we have the @pos syntax to loop over all buttons. For UI image search the same method is available as # syntax (since @ is already taken for the confidence level):

n8_dpi_96.png@0.85#${!times}

So you can use this to loop over all matches above your confidence threshold.

UI Vision ranks all matches above the confidence threshold with numbers #1,#2,#3,#4,… from left to right, top to bottom (just as reading English). You can use the “Find” button to test this!

Here I use it to press all 3 “8” buttons:

Macro:

{
  "Name": "Calc1",
  "CreationDate": "2020-5-8",
  "Commands": [
    {
      "Command": "pause",
      "Target": "1000",
      "Value": ""
    },
    {
      "Command": "times",
      "Target": "3",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "n8_dpi_96.png@0.85#${!times}",
      "Value": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    }
  ]
}

n8