2a. Characteristics of the BrainVoyager QX scripting environment

In the BrainVoyager QX Script Editor the scripts can be edited, debugged and run. The scripts can also be edited in notepad-like applications, but the Script Editor provides functions that are helpful while scripting:

Import and export of QSA scripts
Tabbed pane

Syntax highlighting

Auto completion

Error tracking window

List of runnable scripts

Parentheses matching

Import and export of QSA scripts
The scripts can be used elsewhere by exporting them. Exporting makes it possible to exchange scripts between different computers and different users. The export option is available via the Script Editor menu; choose 'File' and then 'Export script' or press the buttons CTRL + E. This results in a *.qs file. A *.qs file is a textfile, that can be read with any notepad-like application. The file is saved to the last known working directory. The import function is accessible via the Script Editor menu, choose 'File' and then 'Import script' or press the buttons CTRL + I.

Tabbed pane
Each *.qs script gets its own tab. In this way a nice overview is created from the present scripts. The tabs can be reordered via the Script Editor menu, choose 'File' and then 'Reorder scripts...'. Reordering of the tabs has no consequences for the script content.


The reorder function in the menu

 


The reorder window

 

Syntax highlighting
To know immediately whether a scripting method or keyword is typed in the correct way, syntax highlighting is used. BrainVoyager and QSA methods are coloured dark blue. Comment has a green color. Digits are clear blue. In later versions the syntax highlighting will also differentiate between BrainVoyager and QSA methods.

Auto completion
When an object is typed with a dot behind it, the Scripting Editor provides information about all the methods and properties that are available for that object. When the first character of the method is typed consequently, a filter is applied to show only the methods and properties that start with the typed character.
This auto completion feature saves a lot of time that would otherwise be needed to search in the documentation for the right method.

Error tracking window
When typing a script, and eventually running it, errors and the line numbers in which they occur are logged in the error tracking window. This makes it easy to detect and correct errors in the script.

List of runnable scripts
In the right part of the Scripting Editor screen, all available runnable scripts are shown. The script names appear in alphabetical order. The script can be activated by double clicking on it. Only scripts that do not receive a parameter can be run from this list.

Parentheses matching
When the cursor is placed before a opening or after closing parentheses, a green field appears in the screen between the opening and the closing parenthese. This field makes clear which parentheses belong to each other. This is a convenient way to find out whether there is the correct amount of parentheses.

Like shown in the figure above, the cursor is placed at the end of a function. The green color makes immediately clear that the function is closed properly.

Next: 2b. Characteristics of the BrainVoyager methods
Index