FAR Manager Notes

Using results of a program in FAR Manager macros

For FAR 1.75 Use editor:

macro:post CtrlY $Text "edit:<xcopy.exe /?" Enter $While(!Editor) sleep(100) $End CtrlA $IClip CtrlIns %MyVar=clip(0); $IClip F10 MsgBox("Result:", %MyVar, MSGBOX_LEFTALIGN)

Or clipboard (but its contents will be lost)

clip:<xcopy /?
Then stick it into a variable.
Or registry:

somefile.exe arg1 arg2 … argN & reg.exe add "HKEY_CURRENT_USER\Software\Far\KeyMacros\Vars" /v "%%_SomeVar" /d "!!errorlevel!!" /f > nul
macro:load
macro: post msgbox("SomeVar", %%_SomeVar)

@TechnicalNotes @FARManager