A Kwave script consists of a list of lines, where each line can be:
a single command,
a command list, with two or more commands concatenated by a “;”.
or an empty line, that contains white space only
All characters that follow a “#” (except when used in quotes or when escaped) are treated as comments, they will be silently ignored.
Lines that contain only white space or comments are ignored as well.
A Kwave script terminates either when all commands have been
executed successfully without an error or when a command has returned
an error code. There is no special command for aborting the execution
of a script. If you want to implement a possibility for the user to
end a script, you can use the
This shows a message box with the two
buttons “” (which lets the script
continue) and “” (which
returns an error code and stops the script).
Lines that consist only of an identifier, followed by a “:” are treated labels. They can be referenced later in the script by the special keyword “GOTO”  , which makes the execution of the script continue at the location of that label (see example below).
A line that contains a label must not contain any other content (except comments or white space) after the “:”.
# <= this is a label
# do something...