How To Call It
Runtime is a singleton global table: call its functions with a dot (Runtime.<method>(...)).
Coordinate and runtime settings: the macro’s reference resolution (Runtime.setMacroSize), scale, debug mode and completion messages.
Documented for app version 1.0.51Updated:
Runtime is a singleton global table: call its functions with a dot (Runtime.<method>(...)).
In system flow, design steps as observe first and act second when the API can affect device state.
Runtime offers 25 methods; each method page lists its parameters and return value.
Using this API with logging, error handling, and next-step control produces much more professional results than calling it in isolation.
The snippet below is a starter pattern that can be applied directly in runtime flow.
Runtime.setMacroSize(1080, 2400)
print(Runtime.resolution())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.
Runtime.setMacroSize(1080, 2400)
print(Runtime.resolution())Runtime.setMacroSize(1080, 2400)
print(Runtime.resolution())
-- Continue with one focused method on the object.Runtime.setMacroSize(1080, 2400)
print(Runtime.resolution())
local note = "Runtime overview loaded"
print(note)-- In system flow, design steps as observe first and act second when the API can affect device state.
local function run_runtime_step()
Runtime.setMacroSize(1080, 2400)
print(Runtime.resolution())
end
local ok, err = pcall(run_runtime_step)
if not ok then
toast("Step failed")
print(err)
endRuntime.setMacroSize(1080, 2400)
print(Runtime.resolution())
wait(200)
print("Combined with logging and flow control")