Getting Started

Zoomscript is built around 4 program 'modes'. These modes relate to the console window. As mentioned previously, there are three console windows - editor, compiler and runtime - and one hamburger menu.


  • Editor mode (mode 1)

Where you write your code. User input is allowed at all times. Supports syntax highlighting.


  • Compiler mode (mode 2)

Compiles your program and prepares it for execution/runtime. Ensures syntax is correct and allocates memory to variables.


  • Runtime mode (mode 3)

Runs your program, displaying output from called procedures. Also displays crash errors. User input is only supported if a procedure or function enables it.


  • Menu mode (mode 0)

This mode is enabled when the menu is open or a menu option is actively being used. Disables all user input.

The top menu bar (pictured below) includes buttons that can switch between modes. It also adapts depending on which mode is selected.

The buttons perform the following:

Menu button: when clicked, Zoomscript will switch to menu mode (mode 0) and open the hamburger menu with a list of options on the left. Input is also disabled to prevent accidental key presses.

Close menu button: the menu button transforms into a close button when the menu is open. This button closes the menu.

Close menu option button: when you select a menu option, this button appears at the top. When clicked, the mode is switched back to editor mode (mode 1).

Compiler button: switches to compiler mode (mode 2).

Recompile/compile button: runs the compiler. Syntax errors and status is output to the compiler mode console.

Editor button: switches to editor mode (mode 1). Button appears when in mode 2 or 3.

Execute button: when compilation is successful, this button will no longer be greyed out and you can execute your program. Also switches to mode 3.

The console looks like this:

The white circle on the far left side indicates the current line your cursor is on. The cursor is either a straight vertical line (|) when input is being accepted, or an underscore ( _ ) when input is not being accepted.

Zoomscript supports the following characters for input:


  • Numbers (0-9)
  • Letters (a-z, A-Z)
  • Special characters (all, excluding emojis and the less than/greater than signs (<,>))
  • Use the enter key to insert a new line after the current line.


Due to Scratch limitations, there are workarounds for certain key combinations:

  • Backspace: use the left arrow key.
  • Shift: use the up arrow key while typing.

Cursor movement:

  • Move to next line: use the greater-than sign (>)
  • Move to previous line: use the less-than sign (<)
  • Move cursor left: combine the up arrow (shift) with the left arrow key.
  • Move cursor right: combine the up arrow (shift) with the right arrow key.

Indentation:

  • Use the right arrow key. To undo an indentation, move your cursor to the far-left side and use the left arrow (backspace).


Indentation displays as expected:

Zoomscript also supports line comments. These are ignored by the compiler and should be used for code readability. To begin a line comment, use the hash symbol (#).

Strings are highlighted in orange to show they are recognised as quoted strings. The backslash symbol (\) can be used to use special characters in strings that are reserved for other syntax. For example, the strings in the code below allow the hash symbol (#) and the quotation marks (") in the string, without starting a line comment or ending the string respectively.