Indigo provides
a very sophisticated variable replacement feature. This feature is offered
in the Variable Manager Tool Window. If the Variable Manager Tool Windows
is not visible, you can enable it by selecting the "Variable
Manager" option in the "View" menu.
The fist button in the Variable Manager Tool Window enabled
and disabled the Variable Manager replacement system. The next three
buttons create new Variable Manager libraries, open existing Variable
Manager libraries, and save the current Variable Manger Library respectively.
The last button with the "E" symbol is the edit button.
Use the edit button to enter or edit variable names and values. When
completed, click the "E" button again to return to
normal use mode.
You can use these variables in a command line throughout
the program by encapsulating the variable name in square brackets. For
example to send a command "PING 127.0.0.1"
we could enter this command instead "PING [SRV]".
Indigo will detect the
square brackets and attempt a variable lookup. For the variable named
"SRV", it finds the value "127.0.0.1"
so it replaces the variable with the appropriate value. The dynamic
variable replacement will allow you to create commands without hard
coding particular text that can change frequently.
Variables can be embedded in the command entry combo box
of the session window, Command Macros, Command Library entries, and
Command Repeater entries. Variable can also be embedded in other variables.
For example, see the variable table below:
FullName |
[FirstName] [LastName] |
FirstName |
Jane |
LastName |
Doe |
If we send the command "Hello [FullName]"
the Variable interpreter would return "Hello Jane Doe",
deriving each variable separately.
(Note, beware of defining variables within variables where
a potential infinite replacement loop could occur. In this event
Indigo will protect itself by only allowing up to five
recursion replacements before quitting the replacement algorithm.)