Read as Text Activity
The Read as Text activity extracts text content from a specified image file or a defined region on the screen. It utilizes Optical Character Recognition (OCR) to convert visual text into a string variable, enabling further processing within the automation workflow.
| Field | Description | Requirement |
|---|---|---|
| File name | The full path and name of the image file to process. | Required |
| X-coordinate | The X-coordinate (horizontal position) of the top-left corner of the region to extract text from. Requires Y-coordinate, Width, and Height to be specified. | Optional |
| Y-coordinate | The Y-coordinate (vertical position) of the top-left corner of the region to extract text from. Requires X-coordinate, Width, and Height to be specified. | Optional |
| Width | The width of the region to extract text from, in pixels. Requires X-coordinate, Y-coordinate, and Height to be specified. | Optional |
| Height | The height of the region to extract text from, in pixels. Requires X-coordinate, Y-coordinate, and Width to be specified. | Optional |
| Language | The OCR language library to use for text recognition (e.g., ENG for English, TUR for Turkish, RUSfor Russian and NLDfor Dutch). | Required |
| Result text name | The name of the variable where the extracted text will be stored. | Required |
Action Types & Examples
File Name
- Format: String
- Example Result:
C:Robustarobusta.png
X-coordinate
- Format: Digit (Integer)
- Example Result:
68
Y-coordinate
- Format: Digit (Integer)
- Example Result:
347
Width
- Format: Digit (Integer)
- Example Result:
120
Height
- Format: Digit (Integer)
- Example Result:
35
Language
- Format: String (Predefined values)
- Example Result:
ENG(Other options includeTUR,RUS,OCR-B)
Result Text Name
- Format: String (Variable Name)
- Example Result:
readRobustaOcr
Implementation Examples
Field Setup
File name:C:Robustarobusta.pngX-coordinate:68Y-coordinate:347Width:120Height:35Language:ENGResult text name:readRobustaOcr
Execution Parameters
- If
X-coordinate,Y-coordinate,Width, andHeightare provided, the activity extracts text from the specified screen region. - If
X-coordinate,Y-coordinate,Width, andHeightare left blank, the activity extracts text from the entire image specified byFile name.
Technical Notes
The
X-coordinate,Y-coordinate,Width, andHeightfields must be used together to define a region; they cannot be configured individually. TheWidthandHeightvalues must be integers.