For me, issues like this aren't worth the effort to resolve.
This is most likely something that @peternlewis would have to change, or better, give us a shortcut key to add a trigger.
I can just manually arrow down and press RETURN, easy enough.
So, for my use, I remove these Actions:
Pretty sure I don't need the if clause since macro is in the group for KM only but have it anyway to make sure.
I am not sure about step 2 but I think I have tested it correctly too. Just created new macro and tried run the trigger. Say no unique image was found.
Wow, that is a lot of messages. I’ll leave you all to read them, but will add this note:
The Press Button action is waiting for the press to complete, which in this case wont happen until the menu is dealt with.
If you want to ignore that fact, and complete immediately, then turn off all the notification/aborts, and set the timeout of the action to something very small (10 hundredths of a second for example).
That explains why I could get my workaround to work.
I was going to make it so if you triggered it again, while it was waiting, it would do the arrow key/return thing. Essentially, you'd press your hotkey twice.
I used a Semaphore to tell if it was already running. But the second trigger wouldn't run the macro until the first on finished.
I had to make the button finding code more fault tolerant, because Keyboard Maestro was returning different information to System Events for different macros.
This may, or may not be obvious, but If you want a macro that creates a new hot key trigger, you need to copy the two actions from the second macro to the first, like this:
I also added a Pause of 0.5 seconds to give the menu time to display.
Chris, it was not obvious that you call the second macro from the first. You don't mention this anywhere in the comments or in your post.
That's why I added the actions.
But why would you do it like that?
I don't see any advantages, and several disadvantages.
I must be missing something.