What is a Variable?

Like constants, variables can be used to represent data in a task that may be different from machine to machine. But unlike constants, variables can also be modified during a task's execution through the use of the Input Variable action. In this way, variables can be used to represent data that may be different each time the task is run. Also unlike constants, the scope of variables is limited to the context of the task they are used in. For example, creating and adding data to a variable called DATERANGE would not make the data accessible for any other task except for the task it was created in.

Example:

To use a variable, simply select it from within the Step Builder interface. Obviously, a variable is not very useful if data cannot be entered into it. When used in this way the task stops execution to ask for user input -- after the variable is populated with the users entry, other steps may reference the data by specifying the variable name anywhere in the step parameters, like this: !!VARIABLENAME!!

(substitute VARIABLENAME for the variable name you used.)

The two exclamation marks (!!) at the beginning and end of the variable name tell AutoMate™ that the word in-between the !! is a variable, and should not be taken literally. Instead, it is replace with the current contents of that variable.

Starting with the Professional version 4.4 of AutoMate™, unresolved variables (i.e., variables that AutoMate™ does not recognize) are passed to the AutoMate™ scripting language for evaluation. If the string between the !! symbols is a valid AutoMate™ Basic command or expression, the return value of that expression will be returned. This allows you to create inline expressions right inside any AutoMate™ action, without having to build a separate script and run it from a script action. See the inline functions section of the help file for more details.

Related Topics:

Constants

Deployables

Inline Expressions

Create Variable Action

Set Variable Action

Inputing user data into a variable

Sending variable contents as keystrokes

Variable Functions Action

Other Available Actions