How to click relative to bottom, left corner of found image?

I am trying to click the bottom, left icon of the four-icon image appearing in this macro. The challenge is the distance between the stacked icons fluctuates. By offering more than one screen image to match I thought I could click the right location, but I don't know how to calculate the click from the bottom, left instead of top left. I tried using the "height" in the notation, but didn't get anywhere. What's the trick?

To clarify: I understand how to click relative to the top/left corner of a found image, but in this instance I need to click relative to the bottom/left corner since the height of the found image may vary.

Group.kmactions (18 KB)

I don't know if this will help you, and you may have to rework the flow of you macro a bit...but if you use the dedicated "Click at Found image" action, you can select from which corner to base the click off of. See my screenshots. Hope that helps.

1 Like

The bottom left corner would be:

vectorButton.x
vectorButton.y + vectorButton.height

Assuming vectorButton has the results of the found image.

Note that Keyboard Maestro will run all the conditions in parallel, but since it is an “any match”, as soon as one matches it will set the FoundImage token and abort the rest of the conditions, which is lucky as otherwise when they fail they would clear the FoundImage token. So this use of FoundImage token should work.

Thanks, maxnnina. Since I needed to choose from several "found images" I didn't have that option.

Thank you, Peter. I finally know how to use "height".

I've since realized I can use ONLY the bottom set of icons. Since they have a darker background KM sees them as unique.