What’s New
Getting Started

Scripting Console

Last Updated: November 1, 20241.4 min read

Overview

The script console is a standalone console that can be used to run, compile, and disassemble scripts.
Available parameters are:
  • +file
  • Provides the file path for the input file that is used with other commands
  • -verbose
  • Provides additional output and annotation for running other commands
  • -compile
  • Compiles the provided script (sourced) file into a binary script file
  • The result will be written next to the input file with a .script.binary extension
  • -disassemble
  • Disassembles the compiled file (provided or previously compiled) into a text file
  • The result will be written next to the input file with a .script.disasm extension
  • -interpret
  • Interprets (executes) the parsed input file with the AST interpreter and prints the result
  • -run
  • Runs (executes) the compiled input file with the virtual machine and prints the result

Example

With a simple setup in Visual Studio the script console can be used interactively to develop and test (standalone) Sceneri scripts:
ViewCommand Palette... (ctrl + shift + p) ➝ Tasks: Open User Tasks ( tasks.json )
and add follow task:
Copy to Clipboard
This can be connected to a keyboard shortcut through ViewCommand Palette... (ctrl + shift + p) ➝ Preferences: Open Keyboard Shortcuts (JSON)( keybindings.json ).
Copy to Clipboard
When using -disassemble the output file ( .script.disasm ) can be used next to the source file to interactively see the changes to byte code when running the command through the Script Console.
Additionally the setup supports showing warnings / errors and highlighting the problematic lines:

Feedback

Please be sure to submit issues or feature requests through the embedded feedback form. In the event it is a major issue please contact us directly through Discord.

Table of Contents