DocsFlowElse / End If

Condition block: Else and End If in RunMacro

RunMacro RunnerRunMacro 3.5+

The Else and End If pair form the condition block used with IF commands (like Find Image, IF Window, IF Clipboard).

Dialog & quick setup

RunMacro Else / End If command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Else / End If command in RunMacro.
  1. Add a condition command (e.g. Find Image) — it opens the IF block.
  2. Put the commands for the true case right below.
  3. (Optional) add Else then the commands for the false case.
  4. Finish with End If. Save.

Options reference

Else

The boundary between the true and false branches. Optional — omit if you only need the true branch.

End If

Marks the end of the condition block. Each IF block should have a matching End If.

Modes & when to use

RunMacro Runner

Best for

  • Run two different branches for true/false.
  • Cleanly close an IF block so later steps continue normally.
  • Pair with any command that yields true/false (Find Image, IF Window, IF File...).

Use an alternative when

  • Do not add Else or End If without an open IF/Loop block, and omit Else when no false branch is needed.
Before you run
  • Add Else / End If to the macro.
  • Prepare the data or target that Else / End If will use.

Example workflow

Example: click if found, else log

  1. Find Image of the "OK" button (opens the IF block).
  2. True branch: Mouse Click.
  3. Else → false branch: log/exit.
  4. End If to close the block.
Expected result: After execution, Else / End If completes the described action and makes its result available to the next step.

Tips & limitations

Each IF block should have an End If so RunMacro knows the boundary; nested blocks must close in order.
  • Else and End If depend entirely on block order and nesting; closing blocks out of order makes the runner interpret the structure incorrectly.

Applies to RunMacro 3.5+ · RunMacro Runner · Windows 10/11

RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.