AND/OR/XOR

 

These commands increase the power and flexibility of the If statements. The commands are inserted directly into the script as there is not an associated edit window. From the Script Editor click on the Logic category of commands to expand the category. Then select either the AND, OR or XOR command to insert into the script.

 

 

AND

Use this command if requiring two or more conditions to be valid. Multiple AND commands may be placed between the If statements. In this scenario only one End If command is required at the end of the string.

 

 

Sample Macro

 

Let's use an example of T[1] and T[2]. We can create a macro that states if T[1] = Test  AND if T[2] = Example, run the macro "Macrotest.

 

 If T[1] does not = Test or if T[2] does not = Example, then a text box will display instead of running the "Macrotest" macro. Both IF statements must be true in order for the "Macrotest" macro to continue.

If Variable %T[1]% = "Test"

  AND

If Variable %T[2]% = "Example"

  Macro Run: Macrotest

Else

  Text Box Display: Not Found

End If

 

 

OR

Use this command if requiring one of two or more conditions to be valid. Multiple OR commands may be placed between the If statements. In this scenario only one End If command is required at the end of the string.

 

 

Sample Macro

 

In this example only one of the two If statements must be valid. Either T[1] can equal Test or T[2] can equal Example. Both are not required in order for the "Macrotest" macro to run.

If Variable %T[1]% = "Test"

  OR

If Variable %T[2]% = "Example"

  Macro Run: Macrotest

Else

  Text Box Display: Not Found

End If

 

 

XOR

With this option, one of the variables must be false and the other valid. Only one End If is required when the XOR command is placed between two If statements. 

 

 

Sample Macro

 

In this example T[1] would equal Test and T[2] would NOT equal Example, or vice versa in order for the "Macrotest" macro to run. If both If statements were invalid or both were true, the macro would display a text box and not run the "Macrotest" macro.

 

If Variable %T[1]% = "Test"

  XOR

If Variable %T[2]% = "Example"

  Macro Run: Macrotest

Else

  Text Box Display: Not Found

End If