Airdrop - Found Image Issue

I have a macro that Airdrops the Finder's selection to my iPhone. It was working nicely until about a week ago, but now the bit where I click my user icon isn't working.

If I click Go, it recognises the picture of the owl and moves the mouse there. However, the action itself doesn't work. It's not a logic issue; if I reduce the macro to this action alone, it doesn't find the image, so something else is going on.

Any suggestions?

AirDrop.kmmacros (69 KB)

Macro screenshot

Airdrop Selected.shortcut.zip (11.3 KB)

Hey Neil, just out of curiosity, is the action supposed to click at the icon? Because the screenshot shows a move mouse action...

Also I downloaded you macro but didn't actually see that action in it...

Yeah sorry... that action was used separately, just to try to get the image to be recognised while testing. In the macro itself, I'm using something a bit more involved (interval check for found image), so I figured it would be easier to illustrate the problem with a simpler action. The reason I set it just to move was to avoid sending lots of files to my iPhone unnecessarily while testing.

Have you tried taking a new screenshot of the owl image and inserting it into the found image action? I don't know why but sometimes doing that works for me.

Yeah. First thing I tried. Thanks though.

Seems to be something to do with the visibility of the Airdrop window. Very odd that it would be seen under some circumstances and not others.

I have a very similar macro that works reliably for me and there are 3 settings on the "Click on Found Image" that are different on mine that you could try:
[1] Move the slider further to the right so KM is less picky about locating the image
[2] De-select the Display checkbox
[3] change "main screen" to "all screens"

Hope that helps.

Thanks for the suggestions. They are very sensible and I've tried all of them. It's very odd, because testing by pressing Go works just fine. I'm quite perplexed.

Have you updated the operating system of your Mac recently? Sometimes you need to re-enable KM's screen recording permissions for the Click on Found Image Action to work: System Preferences > Security and Privacy > Privacy > Screen Recording

Another good suggestion, but unfortunately I've tried that without luck too. As I said, KM does see the image if you press Go.
CleanShot 2022-06-12 at 12.04.56

I think I might have unearthed the root of the problem, but I don't yet have a solution.

As I'm using a Monterey Shortcut to invoke the Airdrop window, that window belongs to the process "ShortcutsViewService".

This seems to permanently interrupt the macro. For example:

The text is never displayed after the Shortcut has run.

@peternlewis, is this an issue you're aware of?

The Execute Shortcut action wont complete until the Shortcut completes (unless you configure it to run asynchronously).

Is the macro still executing (the Keyboard Maestro status menu icon would still be animating, and/or you can Start Debugging form the status menu to show the macro.

1 Like

Ahh of course. That makes perfect sense. Presumably, I'll have to put it in its own submacro for it to run asynchronously...

Works great! Thankyou!!

No, the Execute Shortcut action has an asynchronous option selection in the output menu - if its asynchronous, then you obviously cannot receive any output from it.

1 Like

Niiiice! Thanks again!

1 Like