///

Record Class

Record replays recordings made with Record Mode from a script, with the same options as the Recording action.

Scripts can only play recordings from their own macro, and cannot make new ones.

Record.play(name, opts?)

Replay a recording by name (case-insensitive; its id also works). Also takes a recording captured at run time by a Record settings row: pass the variable's value or its name. Blocks until playback finishes and returns true. An unknown name throws a script error listing the available recordings; a recording with no steps logs a warning and returns false.

Record.play('Open Chest'); Record.play('Open Chest', { repeat: 3, speed: 1.5 });

Record.exists(name)

Whether that recording exists in this macro.

console.log(Record.exists('Open Chest'));

Record.names()

Every recording name in this macro, as an array.

console.log(Record.names()); // ['Open Chest', 'Sell Loot']

Record.list()

Every recording as { id, name, steps }, where steps is how many actions it captured.

console.log(Record.list()); // [{"id":"...","name":"Open Chest","steps":12}]

playRecording(name, opts?)

Global alias for Record.play. Recording is an alias for Record.

playRecording('Open Chest');

Example:

Record.play("Open Chest"); Record.play("Open Chest", 3); // a bare number (or true) is the repeat count Record.play("Open Chest", { repeat: 5, speed: 1.5, randomization: 4, timingVariation: 10 }); if (Record.exists("Sell Loot")) { Record.play("Sell Loot"); }

Playback options, pass a bare number (or true) instead of the object as shorthand for repeat. Every option also accepts a %variable% token.

OptionWhat it doesDefault
repeatHow many times to replay. -1, "infinite" or true loops forever.1
speedPlayback speed multiplier, 2 is twice as fast. Scales the capture and the delays below.1
startDelayPause in ms before the first step.0
loopDelayPause in ms between repeats.0
postWaitPause in ms after the last repeat.0
randomization± pixels of tap jitter, re-rolled every repeat so no two runs are pixel-identical.0
timingVariation± percent applied to every wait and hold duration so playback is not robotic.0
timeLimitStop an infinite repeat after this many ms. 0 = no limit.0