$If - Macros

Far Manager

$If

The $If macro-command implements conditional execution of the macro sequence fragments.
$If (Expr) TruePart [$Else FalsePart] $End

Elements

Expr
Conditional expression.
TruePart
Execute if Expr is true.
FalsePart
Execute if Expr is false.

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.
  2. The $Else element can be omitted.

Example

REGEDIT4

;more convenient Alt-navigation

[HKEY_CURRENT_USER\Software\Far\KeyMacros\Common\AltUp]
"Sequence"="$If (Viewer || Qview) Up $Else AltUp $End"
"DisableOutput"=dword:00000001
See also: