SOLVED: Struggling to get "Found Image" to work

Hi all,

Would appreciate some help/suggestions. I have checked the wiki, but I seem to need more granular assistance (as a relative newbie to KM), that does not appear to be explained/dealt with in the wiki.

I'm trying to get my Macro to 'click in' a particular spot on a Firefox webpage, using the Found Image action.
I have even set up a "Pause until Conditions Met", with "The Screen" "does contain" and then used the screengrabbed image, to try and bugfix, and I am not having much luck. The "test" notification does not fire unless I change that condition to "does not contain"...

I am unclear whether the error arises due to:
a.) my image (thinking this is it); or
b.) that I'm not telling it to click in the right place relative to that image; or
c.) that I'm telling KM to look on the incorrect screen.

The screengrab in question looks as follows:

I have also tried:

and:

I would think that these images would be unique enough, in order to allow a "click into" the blank field, where the staff number can be inserted - but I'm not getting things right at the moment.

The Error Notification message that pops up, reads: "Macro cancelled. Move or Click Mouse no unique image found. Macro '' cancelled (while executing..."

Here is the macro recipe – Could someone please advise on the following?

1.) The measurements, relative to either the Found Image's top left/right corner, bottom left/right corner or center - are those cm's or mm's?
2.) Are they relative to the screengrab, or to the actual screen?

In other words, if Firefox is sometimes active on my large external monitor, or on my 13" MBP, would those need to be adjusted? Alternatively, would I always need to keep Firefox on a specific screen, for the measurements to work effectively?

3.) Lastly, how does the screen selector actually work?
I've tried both "the front window" and "window with title" - but presumably, things aren't working due to an issue with the image.

Regardless - just to be sure - what "title" is that?
4.) Would it be Firefox, as the first after the :apple: symbol, or would it be the name of the specific tab? If Firefox should work, I presume the preferable option would be "window with title containing"?

Apologies for all these questions - but I've been struggling with this for a while, and were it to work properly, I could use it in many different iterations. I'm hopeful that should I get this working, then the steps taken might helps others in future!

Hey Cassady,

Even though it's been a while now take a breath anyway.  :grinning_face_with_smiling_eyes:

When testing found image macros:

  • ALWAYS hide the Keyboard Maestro editor – as the image in the found image action may be found too under some circumstances.
  • ALWAYS turn ON the “Display” checkmark, so you get visual confirmation an image has been found.
  • If the image is NOT found ALWAYS play with the fuzz slider.
  • It's generally a good idea to initially test on the main monitor in the front window.

With Move and Click at the found image actions it's usually a good idea to set them to Just Move (not click) in the testing phase.

Pixels.

The action tells you – “relative to the” “found image's center” (in your macro).

NOTE – you can change the relative to item via its pop-up menu to one of seventeen different criteria.

Just as it says it does – it's pretty unambiguous. For more information see the wiki:

https://wiki.keyboardmaestro.com/token/Screen

It says window title. Most (but not all) windows on the Mac have a title bar with a title.

If you don't have this macro then download and install it, so you can determine what windows Keyboard Maestro can see and what the index order is.

List Windows Keyboard Maestro Can See (macro)

Post the URL of the page you're working with if you can.

-Chris

2 Likes

Chris - a huge thank you.

Will jump in with your suggestions as soon as I can give my undivided attention to it, and report back here.
I’m sure these will go a long way/all the way to sorting out the underlying issue!

:+1:

Great suggestions, Chris.
I added to the KM Wiki:
Found Image

Chris - managed to get it working! :smile:

Needed to drop the fuzzy level down to 57%, and downloaded your Macro to confirm the necessary title… From there, was a bit of playing around with the pixel settings to get things working i.r.o. where I needed the click to work.

Also closed/minimised the Editor each time, and that appears to have helped.
Works on both my MBP, and with the external connected!

Big thanks for the assistance - plenty of use-cases where I can put this to work now! :+1:

1 Like