How To Call It
Navigation is a global table: call its functions with a dot (Navigation.<method>(...)), not a colon. Requires Macro Handler 1.0.51 or later.
Stops navigation owned by this macro. Returns true only after confirmed input release or when no journey is active; false must block screen actions. Does not stop the whole macro or automatically restart the journey.
Documented for app version 1.0.50Updated:
Navigation is a global table: call its functions with a dot (Navigation.<method>(...)), not a colon. Requires Macro Handler 1.0.51 or later.
Use before tapping a detected target or changing the screen inside an observation group while travelling. Ends the active journey of this macro. It is unnecessary when a point group should finish and return to the route.
Takes no arguments. true means confirmed input release or no active session. false means release could not be confirmed: do not execute the next screen action. Navigation.run finishes with STOPPED; the journey does not resume automatically.
Check the scan result, confirm Navigation.stop(), then call click. requestStop() separately stops the whole macro. Before starting another journey, let the current callback and Navigation.run return; do not start nested journeys.
The snippet below is a starter pattern that can be applied directly in runtime flow.
if Navigation.stop() ~= true then
error("NAVIGATION_RELEASE_UNCONFIRMED")
end
-- Screen actions may follow only after confirmed release.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.
if Navigation.stop() ~= true then
error("NAVIGATION_RELEASE_UNCONFIRMED")
end
-- Screen actions may follow only after confirmed release.local stepOk = true
if Navigation.stop() ~= true then
error("NAVIGATION_RELEASE_UNCONFIRMED")
end
-- Screen actions may follow only after confirmed release.
if stepOk then
wait(200)
endlocal ok, err = pcall(function()
if Navigation.stop() ~= true then
error("NAVIGATION_RELEASE_UNCONFIRMED")
end
-- Screen actions may follow only after confirmed release.
end)
if not ok then
print("API step failed: Navigation.stop: " .. tostring(err))
requestStop()
end-- Never continue to a screen action after an unconfirmed release
local function run_stop_step()
if Navigation.stop() ~= true then
error("NAVIGATION_RELEASE_UNCONFIRMED")
end
-- Screen actions may follow only after confirmed release.
end
local ok, err = pcall(run_stop_step)
if not ok then
toast("Step failed")
print(err)
end-- Inside an observation callback, after a target was detected:
if target then
if Navigation.stop() ~= true then
error("NAVIGATION_RELEASE_UNCONFIRMED")
end
click(target)
end
return true