Far ignores command line parameter for path in panel

You have encountered a problem using Far macros? Here you can get help.
Post Reply
KlepetoX
Posts: 119
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic
Has thanked: 1 time
Been thanked: 1 time

Far ignores command line parameter for path in panel

Post 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.
Last edited by KlepetoX on Thu 05 Dec, 2019 11:05, edited 1 time in total.
buniak_a_h
Posts: 2130
Joined: Sat 20 Apr, 2013 00:17
Location: Питер
Has thanked: 131 times
Been thanked: 211 times
Contact:

Far ignores command line parameter for path in panel

Post 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
Last edited by buniak_a_h on Thu 05 Dec, 2019 11:45, edited 2 times in total.
KlepetoX
Posts: 119
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic
Has thanked: 1 time
Been thanked: 1 time

Far ignores command line parameter for path in panel

Post by KlepetoX »

buniak_a_h - perfect, it works.

Macro looks finally like this:

Post Reply

Return to “Support and Troubleshooting”