DocsKeyboardIF Clipboard

Branch on clipboard content in RunMacro

Desktop ModeRunMacro 3.5+

The IF Clipboard command checks the clipboard against a condition and steers the workflow: if true it jumps to one label, if false to another.

Dialog & quick setup

RunMacro IF Clipboard command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the IF Clipboard command in RunMacro.
  1. Make sure the clipboard has data (Copy Text or Set Clipboard first).
  2. Add a Keyboard › IF Clipboard command.
  3. Choose the comparison (equals, contains, greater, empty, digits, letters) and enter the target value.
  4. Set the IF label (if true) and ELSE label (if false).
  5. Place the commands to run under the matching label. Save.

Options reference

Comparison mode

Equals, Contains, Greater (number), Empty, Digits only, Letters only.

Target value

For Equals/Contains: the string/number to compare — you can enter multiple values (per line or comma) with ANY/ALL mode. For Digits only/Letters only: this field is the set of extra allowed characters besides digits/letters (not a value to compare).

ANY / ALL (match mode)

With multiple values: ANY is true if at least one matches; ALL is true if all match.

Negate (NOT)

Enable to invert the result (true becomes false and vice versa).

IF label / ELSE label

The label to jump to when true (IF) and when false (ELSE). Create labels with the Label command.

Modes & when to use

Desktop Mode

Best for

  • Only continue when the clipboard contains a certain string.
  • Skip/stop when the clipboard is empty.
  • Classify data: digits-only, letters-only, equals a value...

Use an alternative when

  • Do not use it when the value belongs in a stable variable or IF/ELSE labels are not defined.
Before you run
  • Add IF Clipboard to the macro.
  • Prepare the data or target that IF Clipboard will use.

Example workflow

Example: continue only if clipboard contains "OK"

  1. Copy the status text into the clipboard.
  2. IF Clipboard, mode Contains, target "OK", IF label = continue, ELSE label = finish.
  3. Put the handling steps under the continue label.
Expected result: After execution, IF Clipboard completes the described action and makes its result available to the next step.

Tips & limitations

Combine Copy Text → IF Clipboard to read on-screen status then decide the flow.
You must create the matching Label for the jump to work.
  • External clipboard contents can change between steps; Browser virtual clipboard differs from OS clipboard and comparison mode controls conversion.

Applies to RunMacro 3.5+ · Desktop Mode · 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.