OCR Find Text
OCR Find Text
Section titled “OCR Find Text”Type: ocr-find-text · Package: OCR Activities v1.0.0 · Output: object
Searches for text within an image or screen region and returns its position (coordinates). Useful for locating an item by its label and then, for example, clicking near it — when there is no other way to locate it.
How it works
Section titled “How it works”Run OCR on the source (a path file or a x/y/width/height screen region) and look for the text. Returns an object with found and, if found, its coordinates (x, y, width, height) and the corresponding word/line.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
text | expression | Text to search for in the OCR result. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Image path (instead of a screen region). |
x / y / width / height | expression | Screen region to analyze (required if there is no path). |
language | expression | Language code: eng (def.) · spa · eng+spa. |
caseSensitive | boolean | Case sensitive. By default false. |
Output
Section titled “Output”Returns a object: { found, x, y, width, height, word, line } if found, or { found: false } if not.
Example
Section titled “Example”OCR Find Text path = = rutaImagen text = "Total" language = "spa" → output: posIf condition = = pos["found"] └─ then: Log message = = "'Total' está en x=" + pos["x"] + ", y=" + pos["y"]Related activities
Section titled “Related activities”- OCR Recognize File — get all text instead of one position.
- OCR Get Lines — all lines with their coordinates.