Skip to main content
Version: v2.10.0

Utilities

These commands provide various utility functions for controlling script execution and system operations.

stop

Stops the currently running media and returns to the menu.

Syntax

**stop

Arguments

None.

Advanced Arguments

ArgumentTypeDefaultDescription
whenexpression-Conditional execution (see Expressions)

Examples

**stop

Stops whatever is currently playing and returns to the menu.

**stop?when=[[media_playing]]

Only stops if media is currently playing.


echo

Outputs a message to the Zaparoo Core log file.

Syntax

**echo:<message>

Arguments

message (required) The text to output. Logged at "info" level.

Advanced Arguments

ArgumentTypeDefaultDescription
whenexpression-Conditional execution (see Expressions)

Examples

**echo:Token was scanned

Logs "Token was scanned" to the Core log file.

**echo:Platform is [[platform]]

Logs the current platform using an expression.


execute

Runs a command on the host system.

Syntax

**execute:<command>

Arguments

command (required) The command to run, including any arguments. Arguments are split respecting double and single quoted strings. The command is executed directly without a shell interpreter, so shell features like pipes, redirection or command substitution are not supported. The command has a 2-second timeout.

Advanced Arguments

ArgumentTypeDefaultDescription
whenexpression-Conditional execution (see Expressions)

Examples

**execute:reboot

Reboots the system.

**execute:notify-send "Game started"

Sends a desktop notification (on Linux systems with notify-send).

Security Requirement

This command requires explicitly enabling the arguments in the allow_execute config option. Commands from remote sources are always blocked.


delay

Pauses script execution for a specified duration.

Syntax

**delay:<milliseconds>

Arguments

milliseconds (required) The number of milliseconds to pause. Must be a positive integer.

Advanced Arguments

ArgumentTypeDefaultDescription
whenexpression-Conditional execution (see Expressions)

Examples

**delay:500

Pauses for 500 milliseconds (half a second).

**delay:10000

Pauses for 10 seconds.

_Console/SNES||**delay:10000||**input.keyboard:{f12}

Launches SNES, waits 10 seconds, then presses F12.

Blocking Command

This is a blocking command. The entire script pauses until the delay completes.


control

Dispatches a control action to the active media's launcher. This allows you to send commands to whatever is currently playing, such as pausing, saving state, or skipping tracks.

Syntax

**control:<action>

Arguments

action (required) The control action to dispatch. Available actions depend on the launcher handling the currently active media.

Common actions include:

  • toggle_pause - Pause or unpause
  • save_state - Save the current state
  • stop - Stop the active media
  • fast_forward - Fast forward
  • rewind - Rewind
  • next - Skip to next
  • previous - Go to previous

Advanced Arguments

ArgumentTypeDefaultDescription
whenexpression-Conditional execution (see Expressions)

Examples

**control:toggle_pause

Pauses or unpauses the currently playing media.

**control:save_state

Saves the current state (e.g., a save state in an emulator).

info

Media must be actively playing for this command to work. If no media is active, the command will return an error. The available actions depend on the launcher — not all launchers support all actions.


screenshot

Captures the current platform display and saves the screenshot to disk.

Syntax

**screenshot

Arguments

None.

Advanced Arguments

ArgumentTypeDefaultDescription
whenexpression-Conditional execution (see Expressions)

Examples

**screenshot

Captures a screenshot of the current display.

Platform Support

Currently supported on MiSTer only.