Far2: Usermenu & Console Command

Here you can report bugs found in Far Manager.
Post Reply
farman
Posts: 118
Joined: Thu 03 Sep, 2009 11:32
Been thanked: 2 times

Far2: Usermenu & Console Command

Post by farman »

Hi evrybody,
i'm new here (but an old far user). Please don't blame me for the wrongs... :)
And I can't speak Russian too. :cry:

There seems to be an error in "User menu" by handling Console Commands:
(System: Win XP SP3, Far 2: current nightly build)

F2 (User Main Menu):
Command: "CLS & ECHO. & ipconfig /all & ECHO. & ECHO. & PAUSE"

Problem 1:

1. With "CLS" the command doesn't work (tested with other commands too)

2. Test:
Changing the Command to "ECHO. & ipconfig /all & ECHO. & ECHO. & PAUSE"

-> Result:
"ECHO." doesn't produce an empty line. "ECHO." works like "ECHO" (= echo is on/off). Same Error by typing it in Prompt. The other "ECHO." at the end of line work ok.
(Try also: "ECHO. & ECHO. & PAUSE")

Maybe a wrong Implementation in FAR 2? It still works in Far 1.7x.

===========================

Edit:

Problem 2:

Another Error / strange behaviour of FarMenu:

A:
1. Set Directory to %FarHome%
2. F2 (Menu read from Farmenu.ini in MainFolder)
Shows: "Local menu"
3. press Backspace
Shows: "Main menu (FAR folder)" (same as local)
4. press Backspace
Shows: "Main menu (Registry)" (empty)

B:
1. Set Directory not in %FarHome%
2. F2 (Menu read from Farmenu.ini in MainFolder)
Shows: "Main menu (FAR folder)"
3. press Backspace
Shows: "Main menu (Registry)" (empty)

C:
Try this from a Submenu by going back to higher menu with BS (FarFolder and another Directory). This is strange too.


These doubled and empty menus are somehow strange. It's an old behaviour (far 1.x too).
BS should work like ESC. (workaround macro: BS in Menus becomes ESC).

Problem 3:

Recording a Macro (BS in Menus becomes ESC):
Always saved in Work Area "User Menu". It doesn't matter if recording is started in "Main menu" or "Local Menu".
Anyway, it works...


===========================

Btw: Thanx to all the nice people here for helping and working around far. :)
jonib
Posts: 73
Joined: Wed 16 Apr, 2008 19:55
Has thanked: 1 time

Re: Far2: Usermenu & Console Command

Post by jonib »

farman wrote:Problem 2:

Another Error / strange behaviour of FarMenu:

A:
1. Set Directory to %FarHome%
2. F2 (Menu read from Farmenu.ini in MainFolder)
Shows: "Local menu"
3. press Backspace
Shows: "Main menu (FAR folder)" (same as local)
4. press Backspace
Shows: "Main menu (Registry)" (empty)

B:
1. Set Directory not in %FarHome%
2. F2 (Menu read from Farmenu.ini in MainFolder)
Shows: "Main menu (FAR folder)"
3. press Backspace
Shows: "Main menu (Registry)" (empty)
If I understood your "problem", that is how it's supposed to work, when pressing F2, FAR will show the local menu from Farmenu.ini if there is one or will show Main menu read from %FARHOME%\Farmenu.ini and if no Farmanu.ini is found the menu is read from the registry.
And if the current directory is %FARHOME% then FAR reads the Farmenu.ini as a local menu.
And you can change which menu is shown by pressing the Backspace.

jonib
User avatar
John Doe
Бюрократ
Posts: 14236
Joined: Wed 27 Apr, 2005 20:42
Location: github.com/FarManagerLegacy
Has thanked: 80 times
Been thanked: 466 times
Contact:

Re: Far2: Usermenu & Console Command

Post by John Doe »

Problem 1 solution:

Code: Select all

%comspec% /c CLS & ECHO. & ipconfig /all & ECHO. & ECHO. & PAUSE
Problem 2 solution:
Esc

Problem 3 solution:
FAR Macro browser
https://t.me/FarManager — Telegram чат
Игорь Юдинцев
Posts: 726
Joined: Sun 03 Apr, 2005 22:00
Location: Казань
Been thanked: 2 times

Re: Far2: Usermenu & Console Command

Post by Игорь Юдинцев »

John Doe wrote:Problem 1 solution:
a workaround, I'd say.
however, there's a better way that brings the output right into Far viewer/editor:

Code: Select all

view:<ipconfig /all
or

Code: Select all

edit:<ipconfig /all
farman
Posts: 118
Joined: Thu 03 Sep, 2009 11:32
Been thanked: 2 times

Re: Far2: Usermenu & Console Command

Post by farman »

jonib wrote:
farman wrote:Problem 2:

Another Error / strange behaviour of FarMenu:

A:
1. Set Directory to %FarHome%
2. F2 (Menu read from Farmenu.ini in MainFolder)
Shows: "Local menu"
3. press Backspace
Shows: "Main menu (FAR folder)" (same as local)
4. press Backspace
Shows: "Main menu (Registry)" (empty)

B:
1. Set Directory not in %FarHome%
2. F2 (Menu read from Farmenu.ini in MainFolder)
Shows: "Main menu (FAR folder)"
3. press Backspace
Shows: "Main menu (Registry)" (empty)
If I understood your "problem", that is how it's supposed to work, when pressing F2, FAR will show the local menu from Farmenu.ini if there is one or will show Main menu read from %FARHOME%\Farmenu.ini and if no Farmanu.ini is found the menu is read from the registry.
And if the current directory is %FARHOME% then FAR reads the Farmenu.ini as a local menu.
And you can change which menu is shown by pressing the Backspace.
Ah, I see. Primary intention of BS is to change the type of menu. Well, I know this is more a cosmetic appearance, not something like a bug, but F1 sais:
A+B: "The main menu, by default, is stored in the registry, but it is possible to store it in a file. If you create a local menu in the FAR folder, it will be used instead"
So, the content of Main menu is the same as it should be in registry. But what is the sense of going back to the (empty) registry menu? This is somehow confusing...
A: Why there is an "artificial" difference between a local and main menu when I'm using Farmenu.ini in MainFolder? They are both from the same file!
:?
(I look at this from the more practical point of daily work.)

======================
John Doe wrote: Problem 3 solution:
FAR Macro browser
Yes, i know that. But I wasn't looking for a solution. I was only wondering about the strange situation that while I'm recording a macro in Main menu it is shown as a macro in User menu.


======================
@ Игорь Юдинцев
Thanx for the inspiration.
User avatar
John Doe
Бюрократ
Posts: 14236
Joined: Wed 27 Apr, 2005 20:42
Location: github.com/FarManagerLegacy
Has thanked: 80 times
Been thanked: 466 times
Contact:

Re: Far2: Usermenu & Console Command

Post by John Doe »

But what is the sense of going back to the (empty) registry menu?
strange situation that while I'm recording a macro in Main menu it is shown as a macro in User menu.
You can report these issues to bugtracker
https://t.me/FarManager — Telegram чат
Post Reply

Return to “Bug Reports”