$Rep - Macros

Far Manager

$Rep

The $Rep loop macro-command executes the Sequence of the macro-commands Expr number of times.
$Rep (Expr) Sequence $End

Elements

Expr
Expression, evaluated once on loop initialization.
Sequence
Sequence to be executed Expr times.

Notes

  1. It is impossible to use macro-language elements while recording a macro in a usual way. Macro-language elements can be added to the sequence only by editing the registry manually or by using special applications or FAR plugins.

Example

REGEDIT4

;exit FAR Manager

[HKEY_CURRENT_USER\Software\Far\KeyMacros\Common\AltX]
"Sequence"="$If (Editor && (Editor.State & 0x8)) F2 $End
$Rep (2) $If (!Shell) Esc $End $End F10"
"DisableOutput"=dword:00000001
See also: