Kwave Script Files

General Structure

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 ;.

  • a comment,

  • a label

  • or an empty line, that contains white space only

Comments and Empty Lines

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 command msgbox(text). This shows a message box with the two buttons OK (which lets the script continue) and Cancel (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 [2] , 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 :.


	    start:  # <= this is a label
	            # do something...
	            msgbox(once again?)
	            GOTO start

[2] Note: Please don't mix up the keyword GOTO with the text command goto (position) !