Documentation

Script Editor

Syntax highlightingThe editor used to modify your scripts is based upon the industry-standard Scintilla editor.  This is the same programmer's editor used in popular programs such as NotePad++.  It includes full color syntax highlighting of multiple languages, collapsible code sections, matching brace/parenthesis highlighting, code-completion, code call hints, variable linking, search/replace, and many more features expected in a modern code editor.

The script editor is also used in the main Editor window to edit both local and remote files.  Remote files can be edited in this Editor by right-clicking on a file and selecting the Edit option.  Local files can be edited using the #EDIT command.  In each case, the proper language syntax will be loaded based upon the file extension.

Language Support

Custom language support can be added to the editor.  The default languages are defined in the LANGUAGES.INI file.  Additional languages can be added by following the same format given in this file and naming the file Language.lang where "Language" is the name of the language as you want it to appear in the editor menu.

The custom *.lang file defines the various keywords, color styles, and file extensions.  The language must have a corresponding "lexer" entry defined in the current SCILEXER.DLL Scintilla component.  Consult the Scintilla site and documentation for which lexers are supplied and how custom languages are defined.

Line Numbers

Line numbers are displayed in the gutter to the left of the main script.  Line numbers can be turned off in the Editor menu.

Code Collapsing

Blocks of code can be collapse or expanded by clicking buttons next to the line number gutter. This works in all scripting languages. For example, you can collapse a large #IF statement in zScript, or collapse an XML tag when viewing the XML text of a script. Dotted lines are also used to show the indentation level of code blocks.

Code Completion

Code completionWhen typing your script into the editor, the editor will suggest words in a popup list that you can auto-complete by selecting and pressing Enter. This works for any word within the current script, and also works for any zScript command or function. For example, if you type #A then all of the commands that start with "A" will be displayed. This makes it faster to enter scripts and helps ensure that you don't make typos in your command or function names.

Code Hints

Call tipsWhen you enter the name of a command or function, a mouse-over hint is displayed to show the basic syntax of the command/function and what arguments it takes.

Variable/Alias linking

When you move the mouse over a variable reference, a mouse-over hint will show the value of the variable. You can also click on a variable or alias reference to jump to the editor showing that script. A next/prev queue is maintained to make it easy to go back to the previous script (or click the Prev button on your mouse). This next/prev queue works similar to the next/prev in your web browser, making navigating all of your scripts even easier.

Context-sensitive F1 help

When you place the cursor over a zScript command or function in the script editor and press F1, a quick reference panel is displayed giving quick help for that command/function. Clicking the More Help link will open the full help system for that command/function.

Add comment

Login or register to post comments