API changes in comparison to the macro language
- All identifiers are case sensitive.
- Instead of directly specifying the keys you use function
Keys.
$AKey –> Keys("AKey")
$SelWord –> Keys("SelWord")
$XLat –> Keys("XLat")
$Exit –> exit()
- Logical properties have type boolean (so it does not make sense to compare them
with the number
0).
- Function
prompt can return either a string or a false (but never a number 0).
- Many functions are placed in the table
mf (abbreviation from macrofunctions),
e.g.: mf.abs, mf.fsplit, etc.
- Functions
Far.Window_Scroll, mf.beep, mf.fexist and Panel.SetPath return a boolean rather than a number.
- Functions
mload and msave have changed, see their descriptions.
- Context dependent properties are placed in the table
Object,
e.g.: Object.CurPos, Object.Empty.
CheckHotkey -> Object.CheckHotkey
GetHotkey -> Object.GetHotkey
- Logical properties for testing execution areas are in table
Area,
e.g.: Area.Editor, Area.Shell.
Macro.Area -> Area.Current.
Dialog.AutoCompletion -> Area.DialogAutoCompletion
Shell.AutoCompletion -> Area.ShellAutoCompletion
CallPlugin –> Plugin.Call. This call is always asynchronous.
For synchronous calls use Plugin.SyncCall.
- Functions
Plugin.Exist, Plugin.Menu, Plugin.Config and Plugin.Command return a boolean value.
mmode(3,x) no more affects synchronicity/asynchronicity of calls to plugins;
it does nothing and returns 0.
Dlg.Info.Id -> Dlg.Id
Dlg.Info.Owner -> Dlg.Owner
Far.Cfg.Get -> Far.Cfg_Get. This function returns a string in case of success
and false in case of failure.
Far.Cfg.Err does not exist anymore.
FullScreen -> Far.FullScreen
IsUserAdmin -> Far.IsUserAdmin
History.Disable -> Far.DisableHistory
KbdLayout -> Far.KbdLayout
KeyBar.Show -> Far.KeyBar_Show
Window.Scroll -> Far.Window_Scroll
Menu.Info.Id -> Menu.Id
MsX, MsY, MsButton, MsCtrlState, MsEventFlags — see table Mouse
RCounter does not exist anymore.
Macro.Const, Macro.Func, Macro.Keyword и Macro.Var do not exist anymore.
- Macro specification: flag
DisableOutput does not exist; screen redraw is disabled by default;
added flag EnableOutput (apply it if screen redraw is needed during macro execution).
- Macro specification: flags
Selection and NoSelection are no more applicable for
editor/viewer/dialog areas. For these areas one should use respectively EVSelection and
NoEVSelection flags.
- Macro specification: flag
RunAfterFARStart is in effect also when Far Manager is run with /e or /v command line switch. In those cases only macros whose area field contains respectively Editor or Viewer are run.
See also:
Restrictions in the use of some functions