CaseIfConditions
This macro allows automating the text depending on the conditions met. The macro checks the conditions and returns the specified output when the first condition is met. If no conditions are true, it returns the output defined in the (last) Else Output section..
•Name - The unique name of the macro field. The field name cannot contain blanks or special characters. Two fields with the same name and of the same type are treated as one.
•If condition - Specify a condition or select "..." button to choose one of the preset variables, operators or functions. Condition can be any valid expression containing
- Variable names: user defined macro variables (INPUT_Customer etc., SELECT_Gender etc.), built-in variables (A_Hour etc.)
- Operators: and, or, =, >, <, +, -, *, / etc.
- Numbers: 1, 2, 3.14 etc.
- Strings: in quotes: "male", "female" etc.
- Functions: Abs(), Round() etc.
Four conditional outputs and "Else" output can be defined. The macro checks the conditions one by one and returns the specified output when the first condition is met.
•Output - can be one of the following:
- Text - Specify the text to be sent to the active window
- Insert Another Item - Run the content of another command (select "..." button to choose)
- None - Leave the field blank
•Continue/Stop - Select if, after executing, the command should continue or stop
Select OK to insert a %CASE_Name% macro field into the command. Double-click on the field name to open the dialog and edit the macro properties again.
The following example returns the text dependent on the condition met.
%CASE_MyConditions%