Prev | Next |
Console Tab
The script console is a tab of the Scripting window; it is a command line interpreter through which you can quickly enable a script engine and enter commands to act on the script.
You type the commands in the field at the bottom of the tab; when you press the
, the script console executes the commands and displays any output immediately.You can input two types of command:
- Console commands
- Script commands
Access
Ribbon |
Specialize > Tools > Script Library > Console |
Console Commands
Console commands are preceded by the ! character and instruct the console to perform an action.
The available console commands are provided here; to list these commands on the 'Console' tab itself, type ? in the console field (without the preceding ! character) and press the
.- c(lear) - clears the console display
- sa(ve) - saves the console display to a file
- h(elp) - prints a list of commands, as for ?
- VB - opens a VBScript console
- JA - opens a JavaScript console
- JS - opens a JScript console
- st(op) - closes any script running console
- i(nclude) name - executes the named script item; name is of the format GroupName.ScriptName (spaces are allowed in names)
- ? - (without the !) lists commands
- ?name - Outputs the value of a variable name (only if a script console is opened).
Script Commands
A script command is script code that depends on the script engine. Script commands can be executed only once a script console has been created.
Examples:
These lines, entered into the console, create a VBScript console and then execute the script 'MyScript' in the user group 'MyGroup':
>!VB
>!i MyGroup.MyScript
These lines, entered into the console, create a JScript console and then create a variable called x with the value 1:
>!JS
>var x = 1
This image shows the result of entering this JScript example; remember that you can use ?<variable name> to get the current value of any item you have created during the console session.
![The scripting console in Enterprise Architet The scripting console in Enterprise Architet](../images/scripterconsvar.png)
Console Tab Toolbar
The 'Console' tab has two operations available through the toolbar:
- Open Console (
) - click on the down-arrow and select to open a VBScript console, JScript console or JavaScript console
- Stop Script (
) - click to stop an executing script and close the current console
Notes
- This facility is available in the Corporate, Unified and Ultimate Editions
- You can save the output of the console to an external .txt file; right-click on the console window, select the 'Save As' option, browse for an appropriate file location and specify the file name