Skip to content

ZeroTrace HID

Repeat Block

Loop a sequence of commands a fixed number of times

Wrap commands in repeatStart <n> … repeatEnd to run them n times.

repeatStart 3
  writeLn 'still here'
  delay 1000
repeatEnd

n is a signed 32-bit integer, so the ceiling is 2147483647 (~2.1 billion) — large enough to be effectively unbounded. For a genuinely open-ended conditional loop, use while instead. Stop a runaway script from the mobile app or by power-cycling the device.

Common patterns

  • Persistence — re-arm a payload after a host reboot, paired with autostart.
  • Fuzzing — combine with _$random(...) to drive randomized input.
  • Watchdog — periodic check plus a branch on detected state using IF.

repeat is a block, not a primitive: every command between repeatStart and repeatEnd executes in order on each iteration. See Blocks for nesting rules.

Command Palette

Search for a command to run...