Screenshot to OCR to Clipboard Macro (v9.0.6)

Screenshot to OCR to Clipboard Macro (v9.0.6)

I've never really used the OCR feature in Keyboard Maestro because it never seemed all that convenient to use.

When TextSniper came along and I realized that I could do the same thing in Keyboard Maestro with a little bit of effort.

How It Works

  1. Press a keyboard shortcut
  2. You will be presented with the usual macOS 'crosshairs' to select either: a) a portion of the screen or b) press spacebar to select an entire window.
  3. The image is saved to /tmp/
  4. OCR is done on the image
  5. The results of the OCR are saved to the clipboard
  6. A notification is sent to tell the user they can 'paste' the results.

It also tries to be smart enough to recognize if you cancel taking a screenshot (by hitting ESC) then it will not try to OCR anything).

NOTE: Requires (just a little) Configuration

  1. I use ⌥ 4 for a keyboard shortcut. You might want a different one.

  2. Also, be sure to check the OCR step to make sure that you have the language(s) that you want selected and downloaded.

Screenshot to OCR to Clipboard.kmmacros (40 KB)

Does this do anything different to OCR – User-Selected Area Macro (v9.0.1) ?

Ah! I wish I had seen that months ago. Not sure how I missed it or forgot about it.

On the one hand, yes … they do effectively the same thing: “select an area, screenshot it, OCR it, save OCR to clipboard.”

On the other hand…my variation also saves the screenshot to a temporary file in case you decide that you want it for some reason, and it also tries to be smart about what to do if you hit esc which cancels the screencapture command.

So they do the same thing but mine has a few extra auxiliary features around.

Jeez… I could have been using that other one for the past year, though. Bummer.

No worries - I’m not criticising! I only discovered it a month ago which was why yours jumped out at me. At least we’ve all got a choice now :grinning: