Script Editor

The script editor allows adding or editing scripts.

Multiple script files can be loaded at the same time.

it can be opened by clicking Menubar -> Tools -> Edit Scripts or by pressing the ALT + R shortcut or by typing /edit -s.

The editor shares characteristics with all the other editors.

See also /load, /reload, /unload, $script, $scripts, Editor Options.

Script formats

on<whitespace><level>:<event>:command, see Scripting Events for more information.

alias<whitespace><name><whitespace>command

Format when using multiple lines is:

on<whitespace><level>:<event>:{
  /command1
  /command2
  ...
}

alias<whitespace><name><whitespace>{
  /command1
  /command2
  ...
}

Saving a script to a different ini file

To save the current script file to a different ini file, click the Menubar (inside the editor) -> File -> Save As menu item.

Loading a script from a different ini file

To load a script from a different ini file, click the Menubar (inside the editor) -> File -> Load menu item or use the /load command.

When loading scripts using the /load, /reload or /unload command, the script editor will be automatically updated with the new script.

Search/replace text

Clicking the Menubar (inside the editor) -> Edit -> Find or pressing the CTRL + F shortcut opens the search and replace panel.

You can search or search and replace using a Regular Expression by checking the Regex checkbox.

Pressing the ESCAPE key closes the search panel.

Checking brackets

Checking for balanced brackets can be done by clicking the {} menu item to the far right of the Menubar (inside the editor) or by pressing the CTRL + H shortcut.

Reloading a script file

If a script file was modified outside of the editor, it can be reloaded by clicking the Menubar (inside the editor) -> File -> Reload menu item or by pressing the F5 shortcut or by typing /reload.

Jumping to a specific alias in a script

The Alias menu item in the Menubar (inside the editor) can be used to jump to a specific alias in the current script file.

Adding TODO items

The TODO menu item in the Menubar (inside the editor) allows adding and viewing and quickly jumping to a TODO item in the script.

Ignoring a script

A script file can be ignored (not loaded bu still editable) by right-clicking it in the sidebar list and clicking the ignore menu item.

Script Files Order

You can change the order of the scripts in the sidebar list by drag/dropping them. This can be important when you want a scripting event in a file to be run before another file.

Font

The font of the editor can be changed by clicking the Menubar (inside the editor) -> File -> Change Font menu item.

Note: only truetype fonts can be used.

Colors

The editor colors can be changed in Options -> Colors.