screen

screen.screen.find_text

Declaration
lua
screen.find_text(text [, x1, y1, x2, y2 [, lang]])
Description
Find text on screen and return center coordinates.
Parameters
`text` (string) — text to find `x1,y1,x2,y2` (optional) — region (5x faster) `lang` (optional)
Return Values
`number` x, y — center of found text, or nil
Example
lua
local x, y = screen.find_text("OK")
local x, y = screen.find_text("OK", 0, 0, 750, 200)