Page 1 of 1

Far ignores command line parameter for path in panel

Posted: Thu 05 Dec, 2019 11:00
by KlepetoX
I need help with macro, that runs another FAR instance with the same dirs in panels



FAR ingores command line paremeters if left panel is C:\ (root). Try this:
- run FAR
- then change path in right panel (left panel is C:\)
- run macro (Ctrl+Alt+O)
command line parameters are ignored
- then change left panel anyway but root (ie. C:\Users)
- run macro
command line parameters are accepted

What is wrong? Macro or FAR itself? The same is when I call another FAR from command line + Enter instead of win.ShellExecute. I'm trying this in plain FAR with default config and plugins only.

Far ignores command line parameter for path in panel

Posted: Thu 05 Dec, 2019 11:29
by buniak_a_h
far "C:\" "%TEMP%\" - do not work
far "C:\\" "%TEMP%\\" - work
so,
Before "win.ShellExecute" insert lines:

Code: Select all

    if FarLeft:sub(-1) == '\\' then FarLeft = FarLeft .. '\\' end
    if FarRight:sub(-1) == '\\' then FarRight = FarRight .. '\\' end

Far ignores command line parameter for path in panel

Posted: Thu 05 Dec, 2019 12:49
by KlepetoX
buniak_a_h - perfect, it works.

Macro looks finally like this: