<varset> Declares variable and sets its value.

Command Tree: | Variables \ Set
. |
Syntax: | <varset>("Variable", "MessageTitle")
Variable | Defines variable and its value in the form VARIABLE_NAME=VALUE. Variable can be any string (different from system variables). The value can be either constant string or other variable or empty string. There are four basic behaviors of the command: 1. VALUE is supplied. In such case the variable is assigned the VALUE. For example, "vNumber=10" or "vName=John". 2. List of possible values is supplied in VALUE. Each single item in the list is separated by "|" character. For example, "vNames=Jane|Paul|Chris|Michae". 3. VALUE is an empty string ("vName="). In such the case, a dialog window with the MessageTitle appears and prompts user to enter the variable value. Note: To assign an empty string to the variable use this construction: "vEmptyStr=_vStrEmpty". 4. VALUE is equal to "YES/NO". In such the case, a "yes/no" message box withMessageTitle appears. If user selects "yes" button the "YES" value is assigned to the variable. If the user selects "no" button the "NO" value is assigned. For example, "vDoYouWant=YES/NO".
MessageTitle | A title of the window that appears in cases 1 and 3 above..
. |
. |
Example: | <#> This macro demonstrates <varset> command <#> <commands_only_on> <varset>("vName=","Insert Your Name") <varset>("vShow=YES/NO","Do you want to see your name ?") <if>("vShow==YES") <msg>(100,100,"vName","Your name is:",1) <endif> <varset>("vName=Jane|Paul|Michael|Chris","Who is my best friend ?") <if>("vName==Jane") <msg>(100,100,"Yes!","Message",1) <else> <msg>(100,100,"No!","Message",1) <endif>