How Do I OCR a Pre-Determined Area on a Window?

Does anyone know if it's possible to OCR a predefined portion of a floating window?

I'm trying to grab plugin names from Logic Pro. The bottom strip (I've marked in pink) containing the name changes width with different plugins but not height, so I'd like to OCR just the bottom 35 pixels or so.

Alternatively, perhaps I could grab the text from this dropdown menu? Again, the width will vary with different name lengths, but it will always be in the same position.

Your post (and replies) have been moved to a new Topic since you have asked a new question. Please follow this policy in the future.

I saw someone else asking about a specific use case, so I assumed that was the done thing. My bad.

Use the OCR Screen action, with the Area selection, and either the WINDOW or SCREEN function.



Thankyou for the reply. I'm a bit fuzzy on how the area controls work, but as I understand it there's an issue with fixed area settings. To clarify, I'm trying to grab the bottom 35 pixels of a floating window. The window will change size and position depending on which plugin is loaded, so I don't think fixed coordinates relative to the top of the window are going to work. As the width will change, I'm hoping there's a way to capture the entire width of the window.

No problem. No issues with fixed areas.
Here's an example macro to help get you started.

Macro Demo


Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.


MACRO:   OCR a Specific Area on a Window [Example]

-~~~ VER: 1.0    2021-06-28 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

OCR a Specific Area on a Window [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.




  • OCR a Specific Area on a Window [Example]


  1. First, make sure you have followed instructions in the Macro Setup below.
  2. See the below "How to Use" Comment Action
  3. This macro is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.


  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me. ??
      Make These Changes to this Macro
  1. Assign a Trigger to this Macro .
  2. Move this macro to a Macro Group that is only Active when you need this Macro.
  3. ENABLE this Macro, and the Macro Group it is in.
    • For more info, see KM Wiki article on Macro Activation
    (all shown in the magenta color)
    • CHANGE To Your Desired Height from Bottom


  1. KM 9.0+ (may work in KM 8.2+ in some cases)
  2. macOS 10.12.6 (Sierra)+

TAGS: @Example @OCR @Window


Honestly, thankyou so much. I've had a hard few years of bad wrist issues, so this will be a real help reducing the time I spend on a mouse.

I tried your example macro and it works perfectly.