screen

screen.screen.wait_image

Declaration
lua
screen.wait_image(path_or_paths, similarity, retry_count [, x1, y1, x2, y2])
Description
Poll screen until template found or retries exhausted. Binary mode only.
Parameters
`path_or_paths` (string or table) — image path(s) `similarity` (number) — threshold `retry_count` (number) — 1-1000 retries `x1,y1,x2,y2` (optional) — region
Return Values
`number` x, y, x2, y2, sim — or nil×5
Example
lua
local x, y = screen.wait_image("btn.png", 80, 10)
local x, y = screen.wait_image({"a.png", "b.png"}, 80, 20)