Replies: 2 comments
-
Очень рекомендую использовать регулярные макросы, в которых вместо поля code поле action. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Вот макрос, который я использую для перезагрузки макросов (как на Far3, так и на far2l): Macro {
description="Reload macros";
area="Common"; key="CtrlShiftR";
action=function()
local msg = win.GetEnv("FARLANG")=="Russian" and "Перезагрузка макросов" or "Reload macros"
far.Message(msg,"","")
far.MacroLoadAll()
win.Sleep(200)
far.AdvControl("ACTL_REDRAWALL")
end;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Это баги? или так и должно быть? :D
В /home/admin/.config/far2l/Macros/scripts/shell/
лежат 2 скрипта
Shell. CtrlN.lua
Macro {
description="";
area="Shell"; key="CtrlN";
flags="";
code="Keys('m a c r o : l o a d Space Enter')";
msgbox("Warning","All Macroses ReLoaded!",0)
}
Shell. F12.lua
Macro {
description="";
area="Shell"; key="F12";
flags="";
Panel.SetPath(0,'/home/admin/.config/far2l/Macros/internal/','Shell_NumDel.lua')
}
по F12 не хочет работать скрипт (типа неверный? происходит деф. вызов F12)
но если в ком строке выполнить:
lua: Panel.SetPath(0,'/home/admin/.config/far2l/Macros/internal/','Shell_NumDel.lua')
переход работает
жму CtrlN
макросы перечитываются сообщение показывается
и если жать на нём Enter или Esc
выполняется переход по пути setpath который в макросе по F12
Стартуем FAR с 0
видим что выполнился макрос по CtrlN
и опять произошёл переход по пути (выполнился тот setpath из макро на F12)
он типа авто стартующий?
Оставил один макрос
Macro {
area="Shell"; key="F12";
msgbox("TEST","TEST!",0)
}
если FAR стартовали с 0 он автостартует! WHY???
из-за наличия msgbox() при старте то несмотря на большую консоль FAR стартует в 80x25 символов в 90+% случаев
если убрать msgbox() то рисуется на всю консоль
c far.Message"OK" тоже самое.
резюме: из-за наличия определённых команд (setpath, msgbox, far.Message по крайней мере) макрос становится почему то автостартующим?
100% воспроизводимость проблем
ps. FAR far2l_lua_tty_no_smb-230202-9e3a3d1-x64.tar из https://github.com/sorcodiv/far2lua-build без сторонних плагинов
OS: Ubuntu 20.04 LTS
ssh client: putty2far2l or bitvise
макросов кроме этих двоих при тестах не было.
pps. Я так понимаю на линуксовой реализации перезагружать макросы через вызов far.MacroLoadAll()
нельзя? по крайней мере у меня не получается.
ppps. Может Far мой безнадёжно устарел и всё уже поправлено? :)
Beta Was this translation helpful? Give feedback.
All reactions