Conditional If/Then/End

One of the most important custom action. These two actions mark the beginning and end of a conditional block of actions: an If block. If the condition specified in the "Begin If" action is true, the actions inside the If block are executed; if the condition is false, the actions inside the If block are not executed.

The If block must always terminate by a "End Conditional If/Then" action.

Description

To start an If block, add a "Begin Conditional If/Then" action to the action list. After having set its properties, add all actions depending on the condition. To close the If block, add a "End Conditional If/Then" action. Your If block is now operational.

The If block is the best mean to evaluate the value of variables. For example you can check the result of custom actions (that return a variable) as you can see below:

About the "Begin Conditional If/Then" action

This action starts an If block.

Property Name

Data Type

Description

Operator

TOperator

Determines how the variable Variable1 is compared to the value Variable2. There is a defined set of operators from which you you can choose in the list box. See below for more information.

Variable1

VarName

The base key of your registration key. There is a defined set of Base Keys from which you you can choose (in the list box).

Variable2 (a.k.a. Value)

StringEnter the value to be used in the comparison, or another variable name.

Operators Available:

  • Equals: the value of the variable Variable1 must equal the value given in the field Value.

  • NotEqual: the value of the variable Variable1 must not equal the value given in the field Value.

  • GreaterThan: the value of the variable Variable1 must be greater than the value given in Value (the different values must be integers!).

  • LessThan: the value of the variable Variable1 must be less than the value given in Value (the different values must be integers!).

About the "End Conditional If/Then" action

This action closes an If block statement. No properties.

Some restrictions:

Avoid using multiple incremented Begin If blocs (although Paquet Builder supports them). Especially if you use "Go to" statements inside such If blocks. For instance:
 IF condition1 THEN
  IF condition2 THEN
   IF condition3 THEN
   ...

   ENDIF
  ENDIF
ENDIF

The script engine used by the package supports such constructions but it may have unpredictable effects if you also add goto statements inside such incremented "if blocks". However inserting some goto statements into one IF/ENDIF block works correctly.


  Paquet Builder Help - Copyright © G.D.G. Software. All rights reserved.