Is there any way I can read the context (right-click) menu, shown using the "Move and Click" Action ?
For example, IF I see this:
that the context menu has an item for "Annotate this image...", then I know the mouse is above an image. So then, I can take appropriate action, like "Open With".
I have tried the IF/THEN Action:
But it does NOT work. It is always "false".
Contextual menus are not accessible in any way from Keyboard Maestro. I doubt they can be accessed via AppleScript or Accessibility APIs either.
Other than screen capture, I doubt there is any way to test what is in a contextual menu in general.
KM can trigger commands in the contextual menu using "insert text by typing"
You may be able to construct your macro in such a way that it types “Annotate this image…” followed by an if-then.
Haven’t tried to work it all out; just thinking out loud… FWIW
Thanks for the suggestion. Unfortunately, I don’t see any way to make that work.
I was already aware of using the “Insert Text…” approach, and in fact I’m using it. But if the menu item you are “typing” is not there, then it can just select some other item. You can see this by doing it manually.
If you know of an IF/THEN test that will work, I’d be much indebted!