Scripts are written as simple text files. That means you can use Windows Notepad, the CNC Editor or any equivalent ASCII text editor. You cannot use programs like Word or Wordpad that add hidden codes to control formatting and text sizes. These codes, although not visible on the screen, upset the SBS program when it tries to understand them.
In its simplest form a script might just consist of two lines to run two consecutive programs on the PC rather than one
run("message.exe 12654") |
// send a message to supervisor’s PC |
run("pager.exe 012345-67891011") |
// also trigger his pager |
This simple two-line program shows some of the essential aspects of SBS.
Firstly that script uses functions with names and brackets. run( ) is such a function. When script encounters a name like this it tests it against a list of function names that it knows about and this tells it what to expect inside the brackets. run( ) takes one value inside its bracket that must be text and is the name of the program and any details that the program needs to run. If a program needs to be started then have somebody make menu selections and click buttons we cannot handle it.
Secondly, when you want a line of text for the script you put it within quotation marks.
Finally, if you want to explain what is happening in the script you can put comments behind two slash characters // and the rest of the line is ignored by SBS. This can contain an explanation to make the script more understandable and can be invaluable six months later when you come back to change something.