KiXtart accepts the commands described in the following sections.
|
Note |
In this documentation, square brackets ([ ]) indicate optional arguments, and angle brackets (< >) indicate required arguments.
|
Action |
Defines a label within the script file to which you can transfer control.
|
Syntax |
:label
|
Remarks |
Labels must be unique within a script or user defined
function and cannot contain whitespace characters. Labels can be defined inside
script segments (for example inside a WHILE – LOOP segment), but you
cannot jump to such a label from outside the segment.
Also, labels in INCLUDE files are only allowed inside user-defined functions.
|
Action |
Indicates a comment. Subsequent characters on the script line are ignored.
|
Syntax |
;
|
See also |
Block Commenting.
|
Action |
Indicates a new line. This moves the cursor position to the beginning of the next line.
|
Syntax |
?
|
Action |
Plays the default sound.
BEEP
|
Action |
Changes the character mode to large characters.
|
Syntax |
BIG
|
Remarks |
When BIG is used, subsequent screen output is 8 characters wide and 8 characters high. Use SMALL to reset the character mode to normal.
BIG is ignored when screen output is redirected to a file.
|
Action |
Enables (BREAK ON) or disables (BREAK OFF) the ctrl+c/break keys and the Close command. This effectively allows control over whether a script run by KiXtart can be interrupted or not.
|
Syntax |
BREAK <ON | OFF>
|
Remarks |
By default, to prevent users from inadvertently interrupting a script, KiXtart automatically disables the ctrl+c/break keys, removes the Close command in the System menu of the current command-prompt window, and hides the Please wait while your logon script executes message box on Windows 9x.
In a multi-tasking environment such as Windows NT, users cannot be fully prevented from interrupting a program. (Programs can be stopped by using the Task List, for example.) As an additional protection, on computers running Windows NT Workstation only, when BREAK is OFF (the default) KiXtart also installs a special event handler for the current console. The effect of this handler is that whenever a user forcibly terminates KiXtart, the user is automatically logged off. This also means that you must be careful when testing scripts.
|
Action |
Runs a separate KiXtart script.
|
Syntax |
CALL "script name"
|
Remarks |
When the called script ends or when a RETURN statement is encountered, script execution continues at the statement following the CALL statement in the calling script.
Theoretically, there is no limit to the number of scripts that can be nested. Obviously, the practical limit on the number of scripts you can call is determined by the amount of available memory at the time KiXtart runs, the size of the scripts, the number of variables defined, and so on.
Note that CALL cannot be used to run tokenized files have been protected with a password.
|
Action |
Changes the current working directory to the directory specified.
|
Syntax |
CD "directory"
|
Remarks |
Check the value of @ERROR to see if CD was successful.
|
Action |
Clears the screen and moves the cursor to position 0,0.
|
Syntax |
CLS
|
Remarks |
The CLS command is ignored if all output has been redirected to a file using the REDIRECTOUTPUT function.
|
Action |
Sets the color attribute to be used in subsequent display statements.
|
Syntax |
COLOR Xx/Yy
|
Parameters |
|
X |
Foreground color |
|
x |
Optional intensity indication |
|
Y |
Background color |
|
y |
Optional blink indication |
Colour codes:
|
Character |
Low intensity |
|
High intensity |
|
|
N |
Black |
|
Dark grey |
|
|
B |
Dark blue |
|
Light blue |
|
|
G |
Dark green |
|
Light green |
|
|
C |
Dark cyan |
|
Light cyan |
|
|
R |
Dark red |
|
Light red |
|
|
M |
Magenta |
|
Pink |
|
|
Y |
Brown |
|
Yellow |
|
|
W |
Light grey |
|
White |
|
|
Remarks |
If the foreground color is followed by a plus sign (+), the color is displayed with high intensity.
Specifying a plus sign (+) with the background color causes the color to be displayed blinking.
|
Examples |
|
COLOR w+/b |
Bright white text on a blue background |
|
COLOR g/r |
Green text on a red background |
|
$ForeGround = "y+" $BackGround = "n" COLOR $ForeGround/$BackGround |
Bright yellow text on a black background |
|
$NewColor = "b+/g" COLOR $NewColor |
Bright blue text on a green background |
|
Action |
Creates a cookie, or semaphore-file, that the Windows 9x Logon API uses to determine whether the script has finished running. This command is only useful when KiXtart is being used to emulate Lmscript.exe. For more information, see "Lmscript Emulation," earlier in this document.
|
Syntax |
COOKIE1