What command to use - "if any of the following is true"

In a document I wish to accomplish the following.
Look for the word "summary"
1st by image recognition - and if that image of the word summary is not found that using the "move to the word" macro.
So I know I can use the command if any of the condition met - execute actions - but I don't know how incorporate the "movetotheword" macro along with the image recognition of the word "summary" in the same If -then function.

Hopefully I explained myself correctly... :slight_smile:

Is this what you mean?

If an image (of the word "summary") is found - do something
If that image is not found - run another Macro that you are calling "movetotheword"

In which case you would put the execute "movetotheword" macro, in the otherwise part of the If Then Action.

For my own understanding, I tried writing his code using two different approaches: (a) using Find Image to detect the user's word, and (b) using OCR Apple Text Recognition to find the word. I measured the speed of the result.

Speed results will always depend upon intangibles like your model of Mac, your screen resolution, the amount of text on your screen, and more, but here are my results for an M3 iMac with a high-res screen.

  1. Using Find Image performed at about 10 checks per second.
  2. Using OCR performed at about 1 check per second.

For many people, speed is the only thing that matters, so those people would choose Find Image. However my primary consideration for my macros is reliability, and the OCR action is generally much more reliable, because it doesn't depend on volatile things like screen resolution, zoom level, website style changes, etc.

Both methods can be made faster by narrowing down the "area of the screen" where the word is being searched for. In my test, I narrowed my search to the upper right "third" of the screen (1/9th the screen's area in total) and that doubled the speed of the Find Image search, but it quintupled the speed of the OCR search. So the resulting speed difference was about 4x.

Then I narrowed the search area down to one square inch of the screen, and the Find Image speed advantage was only 2x.

Conclusion: if speed is paramount, use Find Image. If reliability is paramount, use OCR.

Thank you Zabobon !

Thank you Airy !