If text on screen (OCR) Action(Power Automate Desktop)

Japanese version.

This action is a companion to the "If" action and branches processing conditional on the presence or absence of text on the screen.

How to use

Drag "If text on screen (OCR)" under "PDF".

Set parameters.

After setting the parameters, put in place an action to be executed when the condition is matched (becomes True) between "If text on screen (OCR)" and "End".

Parameter

If text

Specifies whether the text "Exists" or "Doesn't exist", whichever is True.

OCR engine type

The "Windows OCR engine" has more languages that can be used, so this is basically recommended.

  • Windows OCR engine
  • Tesseract engine

Text to find

Specify the target text.

Is Regular Expression

If ON, the text to be searched is treated as a regular expression,

The search will not only find the starting position, but also the matching text.

This is a feature that should be used as little as possible because the process is quite slow.

Search for text on

Specify where on the screen to search.

  • Entire Screen
  • Foreground window

Search mode

When a sub-area is specified, the position is also specified in X and Y coordinates.

  • Whole of specified source
  • Specific sbregion only
  • Subregion relative to image

A narrower search is possible.

Windows OCR language

This is the language setting when the "OCR engine type" is "Windows OCR engine".

Use other language

"Tesseract Engine" setting.

Turn ON if you want to use languages other than English, German, Spanish, French, or Italian.

Language abbreviation.

"Tesseract Engine" setting.

Set this if "Use other language" is ON.

Select the code from "Lang Code" here.

Language data path

"Tesseract Engine" setting.

Set this if "Use other language" is ON.

Download the "<Lang Code>.traineddata" and "<Lang Code>_vert.traineddata" files.

Specify the directory where the two files are stored.

For example, "jpn.traineddata" and "jpn_vert.traineddata" in Japanese.

Tesseract language

This is the setting for the "Tesseract engine".

If "Use other language" is ON, this parameter is not displayed.

  • English
  • German
  • Spanish
  • French
  • Italian

Image width multiplier/Image height multiplier

Adjust for high-resolution images and screens.

Variables produced

LocationOfTextFoundX, LocationOfTextFoundY

Stores the location of text, if any.

For those who want to learn Power Automate Desktop effectively


The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.

Links

OCR Actions