2.0 BScript Editor
BScript Editor
THe BScript editor allows you to make more complex scripts than the terminal program, and BScripts can saved, run, and tested.

Bscript is a hybrid scripting language for external use (a PC sends commands via USB to the Commander). It consists of the entire Commander ASCII command set and a number of special Bscript commands which are never sent to the Commander but talk to the Bscript interpreter. Commands like REPEAT and UNTIL are examples of BScript commands. This provides minimal logic capabilities when running an ASCII command script.
Bscript is not intended to be a programming language, since it is interpreted. It supplies missing pieces necessary to write a usable ASCII script which can be run in real time from NPBuilder for testing purposes.
BScript has limitations. For example the REPEAT / UNTIL loops can only be nested up to 3 levels. This limit is imposed by the interpreter. The Bscript editor does some colorization of text to distinguish between BSCRIPT commands and ASCII commands and also comments. Comments are all text after the ‘ (single quote) character. While Ascript supports both the ; and ‘ characters for comments, Bscript only supports the single quote character. The BASIC language typically uses the single quote for comments.
BScripts support Parameter Macros. They are referenced as the @ character followed by a number, so there are only 9 Macros allowed (@1 to @9). The macros work with a simple text replacement method. If you define the macro @1 to be the text JX+
then whenever the macro @1 is found in the script it will be replaced with the text JX+ before the script is past to the Bscript interpreter.
BScripts are run by clicking the Play (or RUN) Green Button.
The right side of the Editor is similar to the Commander Terminal Program so you can enter ASCII commands via a terminal. Results of script executionare shown in the terminal window.
BScripts
The BScript Editor is ASCII commands sent from APC directly to the commander. An external device such as APC or even a stand alone system on a chip board like a Raspberry Pi could send commands directly to the commander over Ethernet, USB, or serial port.
Many BScript Editor functions are the same as the AScript Editor.

In this section
See also