@
When a command is pre-pended with an @-symbol, the command echo on the console is suppressed. This has the same effect when you set the variable cv_echo to false.
Example:
@echo "Hello World"
ADDON
Syntax: ADDON <?>
Please note that the host application will need to implement the Addon-system before this command can be used.
LIST
Syntax: ADDON LIST
Lists all the addons that are currently loaded in memory.
Example:
> ADDON LIST
#ID | Name | Version
------------------------------------------------------------------
0 | GUI Prompt | 1.0
1 | IT Ticket Launcher | 1.2
2 | Clipboard Regex Automation | 1.1
------------------------------------------------------------------
3 loaded add-ons.
GETINFO
Syntax: ADDON GETINFO <Int:AddonId>
Displays more information about a specific loaded addon.
Example:
> ADDON GETINFO 2
Add-on information:
Name: Clipboard Regex Automation
Author: mCoDev Systems
Version: 1.1
Description: Automates the clipboard using Regex patterns.
GUID: 2c81a6ee-7361-4f9b-a8a7-258ce909daff
LOAD
Syntax: ADDON LOAD <String:Path>
Loads an addon.
Example:
> ADDON LOAD /path/to/addon.jar
UNLOAD
Syntax: ADDON UNLOAD <Int:AddonId>
Unloads an addon from the system.
Example:
> ADDON UNLOAD 1
CLEAR
Syntax: CLEAR
Clears the console output buffer.
DUMPCFG
Syntax: DUMPCFG
Generate and write the convars.cfg file, dumping all writable, non-volatile variables into this file.
ECHO
Syntax: ECHO <String:Text>
Prints out text to the console output buffer.
Example:
> ECHO "Hello World"
Hello World
EXEC
Syntax EXEC <String:Path>
Executes a CFG-configuration script file. This file contains sequential commands that will run on the console and are often used to set up an environment on the host application, or run scripts.
You can start executing from a label within the file. You can do this by following the file with a pipe-symbol (“|”) and the label name. Make sure to use double quotes when using the pipe-symbol as the pipe-symbol is a reserved symbol on the console system.
Also note that if the code execution from the label you called in the exec command ends in a #RTS instruction, you will receive an error saying that there is not a return pointer available. And if the label doesn't exist, the execution is aborted with an error stating that the label couldn't be found.
Examples:
> EXEC config.cfg
> EXEC "script.cfg | StartLabel"
Examples with error messages:
> exec "./cfg/test.cfg | TestLabel"
> ECHO "This is a test"
This is a test
> exec "./cfg/test.cfg | TestLabel2"
> ECHO "This is a test"
[259073] ERROR: CfgExecutor::run - RTS - Can't return from sub-routine: no return pointer available on the stack, in ./cfg/test.cfg on line 20
> exec "./cfg/test.cfg | NonExisting"
[265808] EXCEption: JCIPSController::run - Could not execute script file './cfg/test.cfg": Couldn't find the label 'NonExisting' inside the configuration file ./cfg/test.cfg
Note: If cv_echo is turned on, you'll see the echoing of the commands run from the CFG-script, like in the example print-out above.
The test file used in the examples above is as followed:
File test.cfg:
TestLabel:
ECHO "This is a test"
#EXIT
TestLabel2:
ECHO "This is a test"
#RTS // This will fail
EVAL (or "?")
Syntax: EVAL <Statement> or ? <Statement>
This command evaluates a JavaScript statement and prints the result on the console output buffer.
Example:
> EVAL 2 + 5 * (8 - 9)
-3
> ? 2 == 2
true
FREE
Syntax: FREE <?> ...
ALIAS
Syntax: FREE ALIAS <String:AliasName>
This command frees a previously registered command alias, removing it from memory.
Example:
> FREE ALIAS myAlias
COMMAND
Syntax: FREE COMMAND <String:CommandKeyword>
This command frees a previously registered command from the system. Only commands that are not protected can be removed this way. This command is rarely used.
Example:
> FREE COMMAND myCommand
VAR
Syntax: FREE VAR <String:VariableName>
This command frees a previously registered console variable from the system. The variable must not be protected.
Example:
> FREE VAR myVar
HELP
Syntax: HELP [String:CommandKeyword]
This command prints out help documentation to the output buffer. If no command keyword is given, a list of all the commands, aliases and variables is printed. If a command keyword is given, it prints out help documentation for that specific command.
Examples:
> HELP
> HELP echo
Command: ECHO
Usage: echo [text]
Description: Prints text on to the console.
LOG
Syntax: LOG <--type <Enum:LogType> <--message <String:Text>>
Prints a log message on to the console. Next to the message itself, the log message also includes the runtime stamp in milliseconds. If cv_logtofile is set to true, the message is also printed to the log file. The name of the log file is "log.txt".
Caution: If the type FATAL is used, the program will also terminate with status code -255. (If this console event is correctly implemented.)
The following log types are available:
- INFO
- NOTICE
- WARNING
- EXCEPTION
- ERROR
- FATAL
Example:
> LOG --type INFO --message "Hello World"
[13748867] INFO: Hello World
NONVOLATILE
Syntax: NONVOLATILE <String:VariableName>
This command makes a writable console variable non-volatile. Non-volatile variables are written to convars.cfg when the program terminates, or the command DUMPCFG is used.
Example:
NONVOLATILE myVariable
PURGECACHE
Syntax: PURGECACHE
This command removes all the files in the .cache folder.
REGVAR
Syntax: REGVAR <String:VarName> <String:VarType> [String:VarValue]
Registers a new console variable that you can use in other commands.
The following data types can be used:
BOOLEAN: Either 'true' or 'false'. You can also use 0 for 'false' or 1 for 'true'. This variable is 1 byte in memory.BYTE: A 1-byte unsigned integer, with range -128 to 127FLOAT: A 4-byte floating point number.DOUBLE: An 8-byte floating point number.SHORT: A 4-byte whole integer number (unsigned)INT: A 4-byte whole integer number (unsigned)LONG: An 8-byte whole integer number (unsigned)STRING: A text variable
The host application can extend this with more types.
Example:
> REGVAR cv_helloworld STRING "Hello World"
SETVAR
Syntax: SETVAR <String:VariableName> <String:Value>
Sets a console variable with a new value.
Caution: If you try to store a value that the data type of the variable does not support, the system will return an error.
Example:
> SETVAR cv_var_a "Hello World"
You can also drop the SETVAR from the command to set a variable. The console system will interpret this the same:
> cv_var_a "Hello World"
STORE
Syntax: STORE <String:Statement> <String:VariableName>
Stores the result of a JavaScript statement into a console variable. This variable must already exist and be writable. If the datatype of the result is not compatible with the target variable, a Type-Mismatch error will be shown.
Example:
> STORE "2 + 6" cv_var_a
TIMEDCMD
Syntax: TIMEDCMD <Int:Timeout> <String:Command>
Runs a command after x-amount of time. The Timeout argument is the time in milliseconds.
Example:
> TIMEDCMD 1000 "ECHO \"Hello World\""
VERSION
Syntax: VERSION
Prints out version information.
VOLATILE
Syntax: VOLATILE <String:VariableName>
Makes a console variable volatile. Volatile variables are excluded when the system generates the convars.cfg file.