How To Call It
FindParam is a singleton global table: call its functions with a dot (FindParam.<method>(...)).
Search parameters: timeout (ms), match threshold mScore (0-1), scan rate sRate (1-30 per second), scale and engine. Chain them as in FindParam.timeout(3000):mScore(0.85).
Documented for app version 1.0.51Updated:
FindParam is a singleton global table: call its functions with a dot (FindParam.<method>(...)).
Parameter objects work best when prepared in a dedicated variable and reused across search or action calls.
FindParam offers 18 methods; each method page lists its parameters and return value.
This object is mostly used to prepare input for action APIs such as Region searches, click(), swipe() and Replay playback.
The snippet below is a starter pattern that can be applied directly in runtime flow.
local param = FindParam.timeout(3000):mScore(0.85):sRate(10)
local match = Region():find(Asset.image("target"), param)From foundation to combined usage, each level is provided as a separate code block so you can copy the level you need and adapt it directly.
local param = FindParam.timeout(3000):mScore(0.85):sRate(10)
local match = Region():find(Asset.image("target"), param)local param = FindParam.timeout(3000):mScore(0.85):sRate(10)
local match = Region():find(Asset.image("target"), param)
-- Continue with one focused method on the object.local param = FindParam.timeout(3000):mScore(0.85):sRate(10)
local match = Region():find(Asset.image("target"), param)
local note = "FindParam overview loaded"
print(note)-- Parameter objects work best when prepared in a dedicated variable and reused across search or action calls.
local function run_findparam_step()
local param = FindParam.timeout(3000):mScore(0.85):sRate(10)
local match = Region():find(Asset.image("target"), param)
end
local ok, err = pcall(run_findparam_step)
if not ok then
toast("Step failed")
print(err)
endlocal param = FindParam.timeout(3000):mScore(0.85):sRate(10)
local match = Region():find(Asset.image("target"), param)
wait(200)
print("Combined with logging and flow control")