Values & constants
Compiler constants (DEFINE)
Mantis comes with DEFINE compiler constants so you can declare reusable text (STR) and numeric (INT) values at the top of your script.
Syntax: DEFINE <name> <STR|INT> <value>
The constant name is conventionally prefixed with # to make it visually distinct in your code (such as #GREETING or #PAUSE_TIME).
constants.mantis
Data types
Mantis supports two primary constant types (STR and INT):
| Type | Meaning | Example |
|---|---|---|
STR | Text constant — used in text commands like STRING, STRINGLN, and FAST_STRING. | DEFINE #TITLE STR Welcome |
INT | Integer constant — used in numeric parameters like DELAY, SET_DELAY, and LOOP. | DEFINE #COUNT INT 1000 |
Speed presets
Mantis also ships four named presets you can pass to SET_SPEED, each expanding to a fixed per-character delay in milliseconds:
| Preset | Delay | Notes |
|---|---|---|
$Fastest | 7 ms | Machine speed — the fastest pace the device allows. |
$Normal | 15 ms | Standard, consistent typing pace. |
$Human | 20 ms | Mimics a steady human typist. |
$Random | 12 ms base | Variable-speed, human-like pacing. |
See Timing for how these interact with SET_DELAY and DELAY.
Last updated on