Find Several Images in the Same Area

Hi everyone, I'm still improving my english, so excuse me if I don't explain well enough, I could try better if you need to.

It's my first time posting, and the first thing I want to do is thank you for all the help you've bring me in almost a year I've been using this marvelous application. JMichaelTX or DanThomas were always there to solve my bugs.
Thank you very much, Peter, you're not the rich you deserve to be, the world is an unfair place.


Now, I want to ask for help with the "image found" function, even though I've been searching the forum looking for it, didn't manage to see a solution that fits my specific problem, but i'm pretty sure it was already answered, if it's so... I'm sorry, but I promise I've searched for it, as I've been doing for this last year.

I know that this tool should be a last "resource", but I can't think about another way to do it, I'll appreciate a suggestion:

I work with a real-time updated chart that show icons I have to click on if they accomplish several conditions. f.e. if a product has a price between 1-10, I have to click on it, in order to add it to the database.
The problem is that there are about 10 different products, each one with a different image on it and different conditions to click on. I'm pretty sure that the system would be more efficient if it were designed another way, but I'm not that high enough in the company hierarchy.

My questions are:

  1. I have about... 15 "if the screen contains X image" in the same macro, and even the Macbook Pro is having issues dealing with it in order to edit them, is there another way to deal with several images? like storing them in variables or local folder, to avoid the computer slowing down while editing.

  2. The product's image are shown several times along the screen for different purposes, so I have to use the "in area" function, in order to point at the exact position the icons I want to click on show up, is there a way to make KBM to search for several images in the same area without writing down the same coordinates for each one?

I would really appreciate a suggestion to avoid working with the "image found" function/tool, I don't care if I have to spend a lot of time on it, but I can see why it shouldn't be the first way to do anything.

Thank you very much in advance.

Hey @Eich-0,

Nyet.

You might try turning the Keyboard Maestro Engine off while working on that macro, and see if that helps.

Menu > File > Quit Engine

You didn't tell us what software you're working in.

I'm guessing a web browser.

If Safari or Chrome then it may be possible to either parse the source or use a JavaScript query to discover the names/tags/URLs of the images being displayed.

That would be quite fast.

-Chris

1 Like

Hey @ccstone,

Thank you very much for your answer.

I'm using a custom basic software, made for one specific purpose: showing a board with 2 colums; one with the name and image of the product, the other one with the actual price. Is not browser related, just a basic window with that board I've mentioned.

It updates itself in real time (every 1-3 seconds, undefined), so I have to pay attention and click on each product when it reaches a price i've been told to. The problem is the number of products, there are about 10 different options, so I think I have no other choice than working with "image found".

The only alternative i can figure out is using variables, but I don't know if they can store images in local folders or something like that, could they? because now it contains an "if" with 10 different images in it,

The option you talk about, getting the names/tags/URLs, is reliable to this macro? Because if it is, I can save all the images in different URLs in my cloud folder or similar, in order to work with them, could it be?

Again, thanks for your answer.

-Alex

Hey Alex,

Keyboard Maestro variables are text-only.

Since you're not using Safari or Google Chrome that method is unfortunately out-of-bounds.

You might find the Case action more straightforward for this task than an IF-THEN action, but your options are limited.

There IS a very tricky way of using images saved in the Finder in Find Image actions:

Find Image on Screen using Clipboard Image?

But you have to be really motivated in order to want to use it.

-Chris

1 Like

Hi again Chris,

As I assumed, there's no alternative (at least for my skills with KBM) to the "found image" condition in order to do that, but it's okay, I hadn't so much hope. After a long time reading about avoiding that tool, wanted to ask the community, to give it a try.

Anyway, I want to thank you very much for trying to help me, I really appreciate it. Since today, I have another reference user to follow.

Have a good day!

-Alex

1 Like