Copyable Example Code
You can paste this into the code editor; still verify target image, region, color, text, and timing values in your own device flow.
-- Wait for an image to appear, then tap it
-- timeoutMs: how long to wait; scansPerSecond: 1-30; score: 0-1
local timeoutMs = 10000
local scansPerSecond = 5
local score = 0.85
Snap.screenRefresh()
local region = Region()
local param = FindParam.timeout(timeoutMs):sRate(scansPerSecond):mScore(score)
toast("Waiting for the image...")
local match = region:find(Asset.image("continue_button"), param)
if match then
toast("Image found, tapping")
click(match)
wait(500)
else
toast("Timed out: image not found")
end