User variables can be created in code with the used with the ‘Var’or ‘Dim’ statements.

Commands are special subroutines/functions that can be called as a variable.

The variables or commands, as found in the References section,  are system defined. Some of these are just Write Only and perform  some action, some are only Read Only to obtain a status, but most of them can be set or read. Note that variables are not case sensitive. User variables may not be named the same as system variables/commands or function names.

Also, variables are all string based, even the numbers. Some clever parsing will make sure that numbers and dates are treated as such.

Setting a variable/command can be done via the following methods:

VarCommand = "Example Text"

VarCommand = [Example Text with

multiple lines, also capable of including "quotes"]

VarCommand = function(something)

[VARCOMMAND]Example Text, can also contain

multiple lines, "quotes" and [brackets][/VARCOMMAND] '(use uppercase in tags)

Dim Variable, OtherVariable

Variable = 2

OtherVariable = "Test"

Variable = OtherVariable

Variable = "Other Value: #OTHERVARIABLE#" 'Variable name in capitals within hashtags is replaced by the variable name

The SetArray function will create multiple variables with the name ‘<Arrayname>_<Number>’. Variables can be set normally or via the GetVar and SetVar functions.

CheckVar is a function that checks if a variable is defined. If not, it will return the default string.

Variables that are declared via 'Dim' or via SetArray are lost when the script has finished. However it is also possible to create global variables.This is very handy for e.g. loading credentials during start up and remaining active for other scripts.

SetArray(ByVal Name As String, ByVal Size As Integer,

               Optional ByVal DefaultValue As String = "",

               Optional ByVal StartNumber As Integer = 1) As Boolean

SetVar(ByVal Name As String, ByVal Value As String) As Boolean

GetVar(ByVal Name As String) As String

CheckVar(VariableName As String, defaultString As String) As String

The following functions control global variables that remain active, even when a script has finished.

AddVariables(variableNames As String) As Boolean

RemoveVariables(variableNames As String) As Boolean

ClearVariables(variableNames As String) As Boolean

SetVariable(Name As String, Value As String) As Boolean

Created with the Personal Edition of HelpNDoc: Benefits of a Help Authoring Tool