Page 2 of 3

FarMenu.ini syntax and special aliases

Posted: Sun 08 Mar, 2020 06:16
by pepak

Latest post of the previous page:

Actually, it's in the English version too. Precisely where Shmuel wrote it would be.

Note that "name of current file without extension" should be "!", not "!^!".

Nested menus are not available in the stock FAR. I implemented a basic support for them and published it somewhere in the forum for an older build of FAR3, but there apparently wasn't any interest in it so I stopped updating it here and only use it in my own FAR build.

FarMenu.ini syntax and special aliases

Posted: Sun 08 Mar, 2020 06:34
by buniak_a_h

FarMenu.ini syntax and special aliases

Posted: Sun 08 Mar, 2020 17:51
by Shmuel
SuperStainless,
- path of opposite panel () !#!\
- name of current file with full path (!\!.!) or? !\!.!
- name of current file in the opposite panel with full path () !#!\!.!
- list of all tagged files () !&

FarMenu.ini syntax and special aliases

Posted: Wed 15 Apr, 2020 16:12
by SuperStainless
Thank you to everyone! Now I can start again to move from my present Commander to FAR!
Nested menus would be useful, because I have a separated file for every menu, but available solution can work. I will adapt my menus. I have a lot of them...
Thank you again and, for the future, I will directly check the hlf files! :)

FarMenu.ini syntax and special aliases

Posted: Wed 15 Apr, 2020 16:55
by HaRT
SuperStainless wrote:
Wed 15 Apr, 2020 16:12
Nested menus would be useful
Nested menus are supported, please refer to what buniak_a_h wrote above (at the very end of the spoiler-hidden text), but they will be stored in the same file as the top-level menu.
I suppose pepak meant including menus stored in other files, this is not supported by “stock” FAR.

FarMenu.ini syntax and special aliases

Posted: Sat 18 Apr, 2020 06:51
by pepak
That's what I meant - includes.

FarMenu.ini syntax and special aliases

Posted: Wed 22 Apr, 2020 16:19
by SuperStainless
You are right, "nested menu" are already present and working. I also meant menus in separate files: would be useful because you can compile the menu only one time and use it in different places.

FarMenu.ini syntax and special aliases

Posted: Sat 25 Apr, 2020 14:40
by SuperStainless
I cannot find a way to execute a command once for each tagged file. I try to better explain: I can get a list of all tagged files (!@FQ!) but I would also like to have the possibility to execute (directly from the menu) a command like this one:
7z t File1.ext
7z t File2.ext
where my tagged files are:
File1.ext
File2.ext

A more complex example:
Opposite panel: C:\temp
Current panel: C:\tmp
Selected directories from current panel: dir1 and dir2

I would like to execute these commands:
ConstantString1 C:\tmp\dir1 C:\temp\dir1 ConstantString2
ConstantString1 C:\tmp\dir2 C:\temp\dir2 ConstantString2

Something "like":
ConstantString1 !\!t !#!\!t ConstantString2

where "!t" is a single line of the tagged files (!@FQ!) list.

I would like to do everything inside the FAR, without using Python or external programmation. Thank you!

FarMenu.ini syntax and special aliases

Posted: Sat 25 Apr, 2020 15:09
by HaRT
SuperStainless wrote:
Sat 25 Apr, 2020 14:40
execute a command once for each tagged file
You can construct your command using CMD's built-in FOR command like this: @for /f %I in (!@!) do @echo %I

18:30 MSK See for /? for (much) more detals.

FarMenu.ini syntax and special aliases

Posted: Sat 25 Apr, 2020 16:10
by buniak_a_h
See Ctrl+G -- Apply command for each file

FarMenu.ini syntax and special aliases

Posted: Sun 26 Apr, 2020 00:12
by SuperStainless
Thank you for the replies. But CTRL+G does not execute the command for every file but for all files (or I cannot understand how to use it). Anyway it is not useful for an highly automatic procedure.
The use of batch file does not give me the same power to do everything inside the FAR.

For example, how I can do, inside the FAR, if I tag "n" files and want to make "n" ZIP files, everyone with only one tagged file?

It is strange that no one has needed this function before, it is present from a lot of time.

FarMenu.ini syntax and special aliases

Posted: Sun 26 Apr, 2020 01:58
by buniak_a_h
SuperStainless, no, Ctrl+G executes command for each selected file (if not - for current file). For example, your case:
Ctrl+G
7z a !.!.7z "!\!.!"

FarMenu.ini syntax and special aliases

Posted: Sun 26 Apr, 2020 02:53
by HaRT
SuperStainless wrote:
Sun 26 Apr, 2020 00:12
The use of batch file does not give me the same power to do everything inside the FAR
You don't need a batch file, just write complex commands right in the user menu.
BTW files are being selected, not tagged.

FarMenu.ini syntax and special aliases

Posted: Sun 26 Apr, 2020 15:21
by SuperStainless
OK, thank you, I understand.
But everytime I have to write the command "7z...". Is it possible to automate it inside the user menu?
I do not mean an history.

FarMenu.ini syntax and special aliases

Posted: Sun 26 Apr, 2020 15:51
by HaRT
SuperStainless wrote:
Sun 26 Apr, 2020 15:21
Is it possible to automate it inside the user menu?
It is exactly what I'm suggesting above. And I'll give you no further guidance unless I see you employ your built-in intellect.

FarMenu.ini syntax and special aliases

Posted: Wed 29 Apr, 2020 00:25
by SuperStainless
I have to operate with tagged files, not selected files. With selected file is easier but a different thing. I think I will solve the problem with an external Python script.
Thank you.