How To Search For Multiple "Found Image" Actions

This topic is in response to:

Here is a TEST macro which demonstrates the concept/approach:

To run this test, first open two web pages:
https://forum.keyboardmaestro.com/

The macro searches for the KM icon on the first page, and if it doesn't find it, searches for the Apple icon on the second page.

##Macro Library TEST Searching for Multiple Found Images

TEST Searching for Multiple Found Images.kmmacros (30 KB)

3 Likes

THANK YOU SO MUCH!!!
I’m still learning:)

I have something similar I want to do, but this seems awfully complicated for it. All I want to do is click a Found Image button and if the button is not found click on a certain location on the screen. I put the two clicks in an iff-then-else. My test is whether after the first click %ActionResult% is OK. If the first click works, I terminate the macro. If it doesn’t, I want to execute the else clause. However, when the first click doesn’t work the macro just stops.

As a general rule, if an action fails it will terminate the macro (not all actions do, but many of the ones that can fail do).

You can control this behaviour in the Action Gear menu (top right of the action).

Failure Aborts Macro and Notify on Failure both want to be off for what you are doing.

It is hard to follow your logic. Please post your macro so we can help.

See:
How to Share Both Image and Macro to Forum Directly from KM Editor

Is this a KM 7 thing? I can’t find the gear. I should have specified that I was still running KM 6 on 10.8. (With all the upgrades to the very many applications and utilities I use, I haven’t found any real reason to upgrade OS X – though I almost needed to for an Xcode projject. KM 7 might just put me past my resistance to 10.10.)

I'm a very late adopter when it comes to OS upgrades. I waited almost a year to upgrade to Yosemite, and it can tell you that it is well worth it. At this point you shouldn't see any OS issues or compatibility issues (except for apps that have been abandoned).

####All of the great new features in KM7 are alone a great reason to upgrade.

For more info, see Any Issues for Upgrading to Yosemite?

####Since you are running KM6, here's how to post your macro (code and image):

  1. Click on the macro name in the KM Editor
  2. Goto File > Export Macro, and save wherever you'd like
  3. Goto Edit > Copy as > Copy as Image
  4. Open Mac Preview app, and goto File > New from Clipboard, and save.
  5. Go to this KM forum thread, and click on reply
  6. Enter some descriptive text,
  7. Use the file upload button in the KM Forum Editor to upload both files.

Looking for something else I stumbled on a forum item that mentioned the found image condition. I didn’t know about that – in fact, I didn’t realize that there was such a rich range of conditions that could be performed in the if-then-else. So I don’t need the click-test-else click strategy – I just need to test for found image, then click it if found and click the other button if not.

Yes, the Action gear menu in general and the ability to control the failure abort in particular are both features of Keyboard Maestro 7.x