Skip to contentSkip to Content
Language guideValues & constants

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):

TypeMeaningExample
STRText constant — used in text commands like STRING, STRINGLN, and FAST_STRING.DEFINE #TITLE STR Welcome
INTInteger 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:

PresetDelayNotes
$Fastest7 msMachine speed — the fastest pace the device allows.
$Normal15 msStandard, consistent typing pace.
$Human20 msMimics a steady human typist.
$Random12 ms baseVariable-speed, human-like pacing.

See Timing for how these interact with SET_DELAY and DELAY.

Last updated on