Command Scripting

Indigo Terminal Emulator

   
 

Indigo Terminal Emulation Software ®

 
   
   
 

Command Scripting

Indigo supports the ability to script data commands being sent to the connected terminal server/device using VBScript. The script can perform whatever sutom logic or processing is needed and return the text or data to be submitted on the command. For example, if you had a command to "SET TIME" on you terminal server, you could create a script command to call the "SET TIME" command and automatically include the time from the local computer. The resulting command may look like this: "SET TIME 22:30"

The scripting command feature supports two methods to execute scriptable commands. You can embed a command script directly into a line of output data or you can call a script directly using an internal command. Upon executing a vb script command, you can call a function that is included an an extenal VB script file or you can enter the VB script code directy on the command line.

If you choose to use an external VB scriptr file, you must include the script file that contains function that you wish to execute in the SCRIPTS directory in Indigo's program path.

C:\Program Files\shadeBlue\Indigo\Scripts

 


Embedded Command Scripting

Embedding a script command directly in data line.

Format for calling a function in an external VB script file.

[@:ScriptName.MyFunction(Param1,Param2,...)]

Example command.

SET TIME [@:MyCustomScriptFile.GetTime()]

Format for executing VB script code directly.

[=:VBScriptCode()]

Example commands.

SET TIME [=:InputBox("Enter time:", "Title", "12:00")]

SET TIME [=:FormatDateTime(Time,vbShortTime)]

The command processor determines that script commands are present by the inclusion of the starting characters [@: or [=: and the ending character ] . All of the text in between these script markers is replaced with the text returned from the VB script. Thus, in the examples above, the resulting command text which is submitted to the connected terminal session would look like this:

"SET TIME 22:30".

 


Internal Command Scripting

Alternately, you can also call scripting command via the internal command system in Indigo. The primary difference between the internal command method and the embedding method is that other command line data cannot be included on the internal command method. This means that all of the command data to be submitted to the terminal session must come from the VB script code or function.

Executing a script command using internal command format.

Format for calling a function in an external VB script file.

:@ScriptName.MyFunction(Param1,Param2,...)

Example command.

:@MyCustomScriptFile.GetTime()

Format for executing VB script code directly.

:=VBScriptCode()

Example commands.

:="SET TIME " & InputBox("Enter time:", "Title", "12:00")

:=
"SET TIME " & FormatDateTime(Time,vbShortTime)

The command processor determines that this is an internal command because the first character is a : . If the second character is a @ then and external VB script file is called. If the second character is a = then the VB code is execute directly.

Thus, in the examples above, the resulting command text which is submitted to the connected terminal session would look like this:

"SET TIME 22:30".


UI Library

One very useful feature of command scripting is the ability to prompt the user for input or a decision before submitting a command. To support the need for user interfaces in command scripting, Indigo includes a UI (user interface) library that provides common user interface components can can be accessed using command scripting.

<click here for more information on the UI library>