Contents
- Index
Variables
Variables can be used to keep track of record and job numbers or to store text strings.
There are 10 variables you can use, 0 through 9. To type the contents of a specific variable number, simply use {Var3} where 3 is the number of the variable.
Use {Var1 =n} to assign a value to a variable. For example, to set variable 5 to the value 10, use {Var5 =10}, or use {Var3 =www.wavget.com} to set variable 3 to www.wavget.com.
You can also ask the user for input with {Var =?Prompt} where prompt is the question that will show in the input dialog box like {Var3 =?Enter invoice number}. You can add a default value like {Var =?Enter name|Paul}.
If the variable contains a numeric value you can increase it with {Var2 +5} or decrease it with {Var8 -3}. This of course does not work if the variable contains a text string.
You can also load and save variables. For example, if you want to keep track of job numbers TypeItIn can type a unique number every time you click the button.
Example: {Var1 Load JobNum}{Var1}{Var1 +1}{Var1 Save JobNum}
{Var1 Load JobNum} loads the variable called JobNum into variable number 1. If the variable does not exist (it has not been saved before) TypeItIn will show a dialog where the user can type in the initial value. If you enter 2009001 the first time you click the button the first job number will be 2009001, the second time you click the button it will be 2009002, third time 2009003, and so on.
{Var1} types the contents of variable 1, in case of the example, the first time you click the button it would type 2009001.
{Var1 +1} increases the value in variable number 1 by 1.
{Var1 Save JobNum} saves the contents of variable 1 to JobNum so it can be loaded the next time you click the button.
You can use {Var3 SetClip} to transfer the contents of a variable to the clipboard, or {Var5 GetClip} to put the contents of the clipboard into a variable.
Use {Var2 Window} to copy the title of the active window into a variable or {Var5 Application} to copy the name of the active application.
TypeItIn can also display a list and return the user's selection in a variable. For example {Var3 List Title:Select a number,One,Two,Three} displays a list with One, Two, and Three. If the user selects Two variable 3 will contain Two.
Most special functions accept a variable as a parameter.