find_text
Find visible text on screen and return clickable coordinates using OCR, covering apps like Chrome, Electron, and Qt where standard UI inspection returns nothing.
Instructions
Where a visible piece of text is on screen, in coordinates you can click. Reads the pixels with OCR, so it works in Chrome, Electron and Qt apps, which expose almost nothing to ui_find. Try ui_find FIRST -- pressing a real widget cannot miss -- and come here when it returns nothing. About 1.5s for a window; cheaper and more exact than taking a picture and estimating. Blind to icon-only buttons: there is no text in them to read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| psm | No | tesseract page segmentation mode. Defaults to 6 inside a window and 11 for the whole screen, which is what measured best for each. | |
| text | Yes | The visible string to find. A phrase is matched across consecutive words on one line. | |
| exact | No | Whole word, case sensitive. | |
| limit | No | ||
| region | No | Rectangle for look:"region", in screen pixels. Object form {x, y, width, height} or array form [x, y, width, height]. | |
| window | No | Search inside this window only (id, wm_class or title fragment). Much faster and far fewer false matches than the whole screen. | |
| min_confidence | No |