Generate a random integer in RunMacro
RunMacro RunnerRunMacro 3.5+
The Random Integer command generates a random whole number within your range (min to max) and places it in the clipboard.
Dialog & quick setup

- Add a Random › Random Integer command.
- Enter the min and max values.
- Save. The result is in the clipboard; use Paste from Clipboard to fill it.
Options reference
Modes & when to use
RunMacro Runner
Best for
- Fill a random quantity/age/number into a form.
- Create a numeric value that changes each run.
- Pick randomly by index.
Use an alternative when
- Do not use it for reproducible, unique, or cryptographic values.
Before you run
- Add Random Integer to the macro.
- Prepare the data or target that Random Integer will use.
Example workflow
Example: a random number 1–100
- Random Integer, min=1, max=100.
- Click the target field.
- Paste from Clipboard.
Expected result: After execution, Random Integer completes the described action and makes its result available to the next step.
Tips & limitations
To type the random number directly (with leading zeros), use Type Random Number.
- Bounds and output are not guaranteed unique; the result uses the configured clipboard/variable path.
Applies to RunMacro 3.5+ · RunMacro Runner · Windows 10/11
