Help files

Variables

Throughout your Processs, you will need to store useful information for passing them on from one action to another: the current date, the file that the user selected, the contents of the clipboard, etc. WinAutomation allows you to store this kind of data, for later use, through variables. You can think of a variable like a storage bin that saves critical information for the smooth execution of a Process. You can save all kind of different types of data into variables, such as text or numbers. For more information about Data Types please have a look here.In order to use variables, you will have to use the specific notation associated with them: the variable’s name should be enclosed in percentage characters. For example, in order to use a variable called “ClipboardText” as input for “Set Clipboard Text” action, you must write: %ClipboardText% in the “Text to store into Clipboard” field of the specific action’s properties dialog box.

Creating Variables

There are 2 main ways to create a new variable:

  1. Through the “Variables Manager Window”. For more information about where to find and how to use this method you can see: “Variables Manager Window”.

  2. Variables can also be created by Actions. Most actions generate output based on the input that has been provided to them. For example the “Get Text Length” action under “Text Actions” category, will accept the text that you want to measure as an input, and provide the number of chars that this text contains as an output. This output will be stored in a variable for later use.

Using Variables

Variables can be used to store any specific type of information that may need to be utilized throughout the Process. Most of the variables that you will use are the “product of a specific action’s labor”: the current date, the files contained in a specific folder, the text that is stored in the clipboard, is information that you can retrieve and store in variables through specific actions.

WinAutomation provides you with an easy and straightforward way to use variables that have been previously created in your Processs: there is a special “gear” icon gearicon.png next to every input that accepts variables in the Action Properties Dialog box. By clicking on that icon, you will be able to directly select any variable or variable property (for information about properties you can check “Data type Properties”) that you want to use as an input.Notice that the gear icon is placed only next to the “Action’s Inputs” (there are no gear icons next to “Outputs”). This does not mean that you cannot use a variable that already exists, as an output, thus overwriting its contents and, possibly, changing the type of data that the variable contains. However, it is suggested that you use a new variable to store a different action’s output: it will help you to keep your Process clear and have a full understanding of what kind of data each variable contains at any given time of your Process’s execution.