Multilingual OCR from area screenshot

Similar to the basic OCR screenshot macro (as posted for example here), but for us European folks who have to deal with more than one language.

OCR Screenshot en⌘de⌃fr⇧es <FCB7 200303T161227>-pty-fs8
OCR Screenshot [en|⌘de|⌃fr|⇧es] <FCB7 200303T161227>.kmmacros (4.4 KB)

How to use

Out of the box, the macro is designed to be triggered from the Global Palette. The OCR’ed text goes to the clipboard:

  • Click macro: OCR in English
  • Command-click macro: OCR in German
  • Control-click macro: OCR in French
  • Shift-click macro: OCR in Spanish

The ttile of the macro tries to give some clues to the modifier key mappings.

Variants

Obviously you can change the OCR languages and the modifier mappings in the macro. You can also add more languages and map them for example to combos like ⌃⌘ or ⇧⌥⌘, etc.

The only modifier you can’t map to is (without anything else) because is reserved to reveal the clicked macro in KM Editor. But you can use combinations of with some other modifier.

Hotkey triggers

If you don’t like palette-triggered macros, then replace the palette trigger with some hotkey triggers, for example:

  • F2
  • ⌘F2
  • ⌃F2
  • ⇧F2

Then change the conditions for the OCR language acccordingly. For example change the French condition from to ⌃F2. If you never use combinations of modifiers (like ⌥⇧) you can also leave the conditions as they are, and just change the operator of the condition from is to contains.

Note: If you go for hotkey triggers, you have to add each of the above mentioned hotkey triggers as separate trigger. Just adding a single ⌃⇧⌘F2 won’t work, as it counts as a single (combined) trigger.

5 Likes