6.1.4 Reserved variables
JP1/Script provides a number of reserved variables for referencing specific data (system information and command return values).
Table 6-2 shows the various categories of reserved variables and their meaning.
Category |
Reserved variable |
Meaning |
---|---|---|
System reserved variable |
YES when the user has administrator privilege; Empty without administrator privilege. |
|
Name of the work folder for the script file being executed. Followed by a backslash (\). |
||
Name of the computer on which the script file is being executed. |
||
Name of domain on which the user is logged. |
||
Operating system and version:
|
||
Operating system:
|
||
Operating system minor version:
|
||
Operating system major version:
|
||
Folder name of the script file being executed. Followed by a backslash (\). |
||
File name of the script file being executed. No extension. |
||
Extension of a script file (.SPT). |
||
Extension of a menu information file (.SPN). |
||
Extension of an execution environment file (.SPV). |
||
Extension of a monitoring information file (.SPD). |
||
MS-DOS startup folder name. Followed by a backslash (\). |
||
Folder name for temporary files. Followed by a backslash (\). |
||
User name of the person logged onto the system. |
||
Windows folder name. Followed by a backslash (\). |
||
Folder name in which the Windows driver resides. Followed by a backslash (\). |
||
Process reserved variable |
Process identifier of the script being executed. |
|
Array variable that stores location variables from %1, accessed in the form _ARGV_(n) where n is any numeric starting at 1. |
||
Total number of location variables from %1. %0 is not included. |
||
Command return value reserved variable |
Execution result of the Copy command. |
|
Number of files copied by the Copy command. |
||
Number of files not copied by the Copy command. |
||
Number of files skipped with ErrSkip2 specified in the Copy command. |
||
Return value of the Exec, NetExec, or CallSpt command. Signed numeric. |
||
Executable file ID for the Exec or NetExec command. Valid only when Flag is set to False (do not wait for called program to exit). |
||
Return value of a job operating command. |
||
Return value of the InputBox or MessageBox command. |
||
Return value of an external function of the CallDll command. |
||
Reason for termination of a window (menu form). |
||
Command number when a window (menu form) is terminated by command execution. |
||
Modifier key of the window (menu form) termination key. |
||
Name of the field that last had the focus. |
||
Error detail code. Signed numeric. Execution results of a command are set. However, for a command that returns a specific value (such as a character string manipulation command), 0 is always set in the _RTN_ reserved variable. The cause of the error indicated in the error detail code will be output to the trace file as an error message. |
||
Return value of the CallDll command (where xx is a number from 00). |
||
Return value of a service operating command. |
||
Character code reserved variable |
New line character. |
|
Tab character. |
||
Error detail code reserved variable |
No error. |
|
End of file. |
||
Timeout exceeded. |
||
File not found. |
||
Path not found. |
||
Access denied. |
||
Write-protected. |
||
Device not ready. |
||
Another process is accessing the file. |
||
Server does not respond to the connection request. |
||
Timeout occurred while waiting for a response from the server. |
||
Error occurred while receiving data from the server. |
||
Allowed time for no data transmission was exceeded during communication with the server. |
||
Value cannot be set in the variable because the acquired value exceeds the variable's maximum value. |
||
The size of the specified file is greater than the maximum value. |
||
Read/write start location is beyond 2,147,483,647. |
||
The JP1/Script service is not running. |