When is a click not a click - click on found image problem

HI! Apple M2, Sonoma 14.7.2

I'm trying to run click on found image - it is happily finding the image, but isn't doing the right sort of "click". I am using a javascript web app called "Atticus" - and I'm trying to automate some of the formatting.

I want to have a keyboard shortcut to perform the Atticus action "insert an image", and I have the screenshot of the correct button. "found image" is "finding" just fine - pointer goes right to it. The problem is that the action box that should appear when the button is clicked never appears. If i have it double click, the action box appears then disappears. If I have it just do the single click, I can immediately click and the box appears. I've tried delays and triple clicking.

Help?

What kind of delay did you try? I suspect what you may need to do is move the mouse first, without a click, then delay, then "click at current location." But I could be wrong here.

I would try a delay between moving and clicking.

Use the action to move to the spot. Then pause a short time. Then click at the current location.

You could also try click and hold, short pause, release.

3 Likes

ok! So, thank you for all this... a few things. 1) I had been looking for the "click mouse" function, finally found it under "move or click mouse" (sigh)

and

  1. the magic incantation was....

Click on found image (and hold)
pause 0.1
Click at current mouse position

I have no idea why it needs the last 3/4 of that, but hey - doesn't matter. I can now do the same thing for all the images on the toolbar, and this is awesome.

Thank you so much!

Web apps are more pernickety than normal apps -- some of the tricks they use to create a "responsive" interface work fine for human user speeds but are easily out-paced by Keyboard Maestro. So you'll often have to move-pause-click or similar.

There's no hard and fast rules, just bear it in mind for next time and be prepared to try a few things before you get something that works.

1 Like

Ok, celebrated too early... This is so weird.

I can "run" the macro from the macro builder window, and as long as it can see the target window, it runs fine. I can run the macro using the key command I bound it to, as long as the macro builder window is at the front.

If I put my target application at the front, the key command doesn't execute. I don't get a fail - it just doesn't go. Like, it's not that it fails, it just doesn't even start.

But, all my other bindings work fine! This is the same format. I tried a couple other key bindings to see if one of them would work. They all start executing and open the applications they're supposed to.

I've tried with different "main window" etc. I've tried with a "named window" - but it's not seeing the name of the window - like according to KM, this window name doesn't exist - even though I'm looking right at it.

I do feel like this has something to do with the window, but I can't say why I feel like that.

Thoughts? Thank you for the help so far!

One possible reason is that Pause 0.1 is too short for a pause.

Another possible reason is that you may be using a browser that causes problems. What browser are you using? If not Safari, then try Safari anyway just to see if that fixes the problem. That will tell us something.

Another possible thing to try is my original idea of moving first, then pausing, then clicking. Try pausing for a longer time, in order to test if it works, then shorten the pause if it works.

Another possible solution is, instead of clicking just once, click in a loop that ends when the image no longer exists.

Since Nige is on your case, and he's a super-duper-wizard, it's probably better to follow his advice than mine, but since he hasn't answered in a few hours, I thought I'd try again.

Every time a macro “does nothing” the answer is to use the Interactive Help, Something expected is not happening, and verify that the macro is triggering.

Once you know it is triggering you can look at what the macro actions are doing to see what is going wrong, but until you know it is triggering there is no point.

Web apps often will react to the mouse moving in to a location by preparing for the click, setting up state and such, and so Keyboard Maestro moving there and clicking quickly (or a user who was quick enough) can cause these sorts of issues.

1 Like

9 times out of 10 this means your macro is in a Group that isn't enabled/active when the app you want to control is frontmost.

But it isn't clear from your "just doesn't go" if you've checked the Engine log (available from the Editor's "Help" menu, "Open Logs Folder", double-click to open in Console) and seen it isn't triggering. If it is triggering but not doing anything you may have a Condition that is failing, or it may be that your image detection is failing and you don't know because you've turned off Notifications from KM.

Try the Interactive Help, as Peter suggests. Make sure Notifications are enabled. And if you're still stuck then post your macro (instructions here) so people can try and help.

Hey, I'm gearing up to try these suggestions, but I just wanted to start by saying thank you so much for taking your time to help me. Now imma go dig into this. :slight_smile:
I've had KM for a while, but have only been using the most basic of functions - the software equivalent of the Hummer going to the 7-11 on the corner. :slight_smile:
I'm hoping to change that now.

Anyhow, thank you!

1 Like

ahha! One of the things that was said spurred me to try something - so, the "app" I have been using is a PWA (progressive web app) - if I just open up the actual site, guess what...

It works great!

I'm not getting a ton of value out of the PWA, so, I think that the easiest thing for me is to just use the website. I rarely am out of site of the Internetz, so...

Thanks for the suggestions. I will spend some time debugging the PWA thing in the future, but for now - just gonna run it in chrome.

(it was the suggestion from @Airy that I try safari that got me to just say "hmmm" I wonder...)

I am going to play around with some of the other debugging steps, like the interactive help (something that I didn't know existed). Is there a good place in the documentation that is a "hey start here if you are having problems"? I will read over all that.

Thanks again for helping me. I also appreciate the help from @Nige_S - I was watching the log folder, and it was funky watching it activate perfectly with the KM window around (but the image hidden, natch), and then not even activating with the app window forefront - having changed nothing other than the order of the windows. I tried a bunch of stuff having to do with where it was detecting the image, but it was doing that just fine.

@peternlewis I'm going to dig into the interactive help. Thanks for the pointer to that.

This is a fantastic group, and I feel very fortunate to have gotten the help I did in such a timely, friendly fashion.

I hope everyone is having a spectacular new years eve. I'm doing exactly what I want to - just hanging out pissing around. I do a lot with AI, and so now, I'm going to go play with Claude and its local machine control capabilities via the model control protocol. (MCP)

I want to, just for fun, make Claude aware of KM via MCP and see what we can do together. I'm sure someone else has done it already - I'm just doing it to learn. I am finishing a book (well, a couple books) on AI for businesspeople, and I think this will be an interesting use case.

But, you know, I digress. :slight_smile:
Thanks!

1 Like