Skip to main content
Version: v2.9.0

ZapScript

ZapScript is a small scripting language written to the storage of Zaparoo tokens. It tells Zaparoo what to do when a token is scanned. Through regular use you won't need to write much yourself, but you can use it to customize launching or add scripted actions.

Quick Reference

CommandDescription
launchLaunch media from a path or identifier
launch.titleLaunch by title ID with explicit syntax
launch.systemLaunch a system/emulator
launch.randomLaunch a random game
launch.searchSearch and launch by filename pattern
input.keyboardSimulate keyboard input
input.gamepadSimulate gamepad input
input.coinp1Insert coin for player 1
input.coinp2Insert coin for player 2
http.getMake an HTTP GET request
http.postMake an HTTP POST request
playlist.playLoad and play a playlist
playlist.loadLoad a playlist without playing
playlist.openOpen playlist picker menu
playlist.stopStop and clear playlist
playlist.pausePause playlist
playlist.nextNext playlist item
playlist.previousPrevious playlist item
playlist.gotoJump to playlist position
stopStop current media
echoLog a message
executeRun a shell command
delayPause script execution
mister.iniLoad MiSTer ini file
mister.coreLaunch MiSTer core
mister.scriptRun MiSTer script
mister.mglExecute MGL content

Command Categories

  • Launch: Commands for launching games, systems, and media
  • Input: Commands for simulating keyboard and gamepad input
  • HTTP: Commands for making HTTP requests
  • Playlist: Commands for managing playlists
  • Utilities: Utility commands (stop, delay, echo, execute)
  • MiSTer: Commands specific to the MiSTer platform

Syntax

The syntax of ZapScript is designed to be human-readable and writeable, with minimal complexity and focused on fitting as much information as possible on the limited storage available on NFC tags and QR codes.

See Syntax for a detailed explanation of all the different parts of ZapScript syntax, Expressions for dynamic values, and Zap Links for remote script hosting.

Examples

Launch a game

@Genesis/Sonic the Hedgehog

Or with the explicit command:

**launch:PCEngine/Another Game

Launch a game with a delay

**delay:1000||@SNES/Super Mario World

Send an HTTP request and launch a random game

**http.get:https://api.example.com/hello||**launch.random:Genesis

Launch different content based on platform

Genesis/Game.md?when=[[platform == "mister"]]||PCEngine/Game.pce?when=[[platform != "mister"]]

Use expressions for dynamic paths

SNES/games-[[platform]]/Super Mario World.sfc