Conditional Statements (IF/ENDIF)

Conditional Statements

Macro Recorder allows adding conditional statements to a macro. A conditional statement (or "an IF statement") is a statement that can be expressed in "if...then..." form. The IF statement controls the execution of a block of commands (or a single command) depending on whether the condition is TRUE.

How IF statements are processed

If the condition is TRUE, Macro Player executes the subsequent commands that follow the IF statement.
If the condition is FALSE, flow control skips to the ENDIF statement.

Example

A conditional statement example of use (in human language):

  • [IF] the File Exists
  • Delete the file
  • [ENDIF]

    Conditional Statement Types

    Macro Recorder offers various IF statements:

  • "IF Message" which displays a message with YES and NO buttons (evaluates to TRUE if user presses YES)
  • "IF File Exists" which searches for a file (evaluates to TRUE if user presses YES)
  • etc

    IMPORTANT: after inserting an IF statement remember to insert a corresponding ENDIF.

    © JitBit Software Macro Recorder homepage