Script File Variables |
Top Previous Next |
Variable arguments are internally or user defined string or numeric values that may be used in script commands where an alphanumeric or numeric value is expected. Variables may be created and assigned a value by using the SET or SETNUM script commands, or are automatically created and assigned a value by the FileLink script processor when used in certain script commands.
Script variables begin with at least one alphabetic character and may be up to 255 characters in length. Variables are not case sensitive. For example, $abc and $ABC are the same variable. Up to 4096 variables may be assigned at one time.
Once a variable is assigned, it remains defined for the duration of an active script file or until it is unassigned with the SET command. The values assigned to script variables may be up to 1020 characters in length. Examples of alphanumeric variables are shown below:
SETSET phone_number = "555-1212" DIAL phone_number SETSET file name = "c:\anyfile" DELETE filename
FileLink script files may perform substring manipulation on variables. The SETEXTRACT, SETLEFT, SETMID, SETRIGHT, and SETSUBSTR commands allow extraction of a delimited substring, substrings from the left to right from mid string, right to left, and to finder the occurences of a substring respectively.
FileLink script files may also perform basic arithmetic manipulation on numeric variables. The INC and DEC commands allow incrementing and decrementing of numeric strings while the SETNUM command permits adding, subtracting, multiplication, and division. Examples of numeric variables are shown below:
SETNUM x = 1SET SETNUM e = m x c x c ;; (hint: e = mc2) INC x
There are a number of internal script variables assigned by FileLink to make your script development easier and more powerful. These are described their own Internal Script Variables section.
See also: Using Shortcut Target Arguments in Script Files
|