Skip to main content

Scripts

Scripts

Lists scripts from /scripts/ on the SD card and runs the selected entry.

Controls

ButtonAction
Center / OkRun the highlighted script
GreenEdit a highlighted rTHON .rtn or ZoomIO .zio script
BlueStop the running script
RedReturn to the main menu
CancelThis help page

WASM binaries are run-only. Source scripts return here after the Editor saves or discards the editing session.

Serial menu

Scripting > App Signals manages shared named values, waves and streaming. Scripting > Wili Files loads, saves, resets and configures default Wili projects.

Scripts Log

Shows the text a running WASM or RTHON script writes.

The screen

A scrolling log fills the screen, oldest at the top and newest at the bottom.

Controls

ButtonAction
BlueClear the log
CancelThis help page

Gray is labeled here but does nothing. Green is labeled "input" but also does nothing on this screen. Yellow and Red carry no label and do nothing. HOME leaves the screen from here, as it does everywhere else in the menu.

Reading the log

This view only fills in while it is on the display - output from a script while some other screen is showing is dropped, not queued up for later. Blue clears what has accumulated so far without stopping the script itself.

A WASM script's output comes from its own print calls, in whatever color the script picked. An RTHON script writes two kinds of line here: the interpreter's own status messages (a startup banner, "Compiling ....", a tokenization count, "No errors" or "errors", "Starting...", "Program complete ...." when it finishes) and, separately, whatever the script's own print() statements write - both always black.

Stopping a script

Blue on this screen only clears the log, it does not stop anything running. A WASM script is stopped with Blue on the Scripts list itself (see scripts.md), not from here. RTHON scripts have no stop control at all once started.

Taking over the screen, or not

Picking a WASM or RTHON script takes over the whole display with a dedicated running-script view until it finishes or HOME leaves - see scripts.md for picking a script. A Zoom (.zio) script is the opposite: picking one starts it in the background and leaves whatever screen you were on alone; it has no log view of its own.

About this panel

This log view is built as the Scripts app's second panel, but nothing in the current pick-list flow switches to it - picking a script opens the running-script view described above instead. Its clear button and log widget work as described here if this panel is ever reached, but day to day the log a running script fills is the other view, not this one.

RTHON scripts

Do not run RTHON scripts yet, including the seeded hello.rtn example. The RTHON interpreter needs a single stack frame bigger than the stack MAIN gives it, so any RTHON script overflows the stack and can crash the device. The RTHON runner is menutool output, so the fix belongs in that generator, not in a hand patch here.