How To Call It
Tune is a singleton global table: call its functions with a dot (Tune.<method>(...)).
Settings for this run: a script can store and read back a match threshold, tap and swipe delays, a scan interval and a comparison size; these do not change searches or gestures. Only the grayscale switch changes searches: from Macro Handler 1.0.51, Tune.grayscaleOn() makes image searches colour-independent.
Documented for app version 1.0.51Updated:
Tune is a singleton global table: call its functions with a dot (Tune.<method>(...)).
Parameter objects work best when prepared in a dedicated variable and reused across search or action calls.
Tune offers 19 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.
Tune.grayscaleOn()
local match = Region():find(Asset.image("enemy_icon"), FindParam.timeout(2000))
Tune.grayscaleOff()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.
Tune.grayscaleOn()
local match = Region():find(Asset.image("enemy_icon"), FindParam.timeout(2000))
Tune.grayscaleOff()Tune.grayscaleOn()
local match = Region():find(Asset.image("enemy_icon"), FindParam.timeout(2000))
Tune.grayscaleOff()
-- Continue with one focused method on the object.Tune.grayscaleOn()
local match = Region():find(Asset.image("enemy_icon"), FindParam.timeout(2000))
Tune.grayscaleOff()
local note = "Tune overview loaded"
print(note)-- Parameter objects work best when prepared in a dedicated variable and reused across search or action calls.
local function run_tune_step()
Tune.grayscaleOn()
local match = Region():find(Asset.image("enemy_icon"), FindParam.timeout(2000))
Tune.grayscaleOff()
end
local ok, err = pcall(run_tune_step)
if not ok then
toast("Step failed")
print(err)
endTune.grayscaleOn()
local match = Region():find(Asset.image("enemy_icon"), FindParam.timeout(2000))
Tune.grayscaleOff()
wait(200)
print("Combined with logging and flow control")