I don't know if this has been discussed before or not (a quick search didn't return any post), but I would like to be able to have User Menus (those shown when you press the F2 button) according to the file name or file extension of the current file/files.

The way I imagined it it would be something like the user has multiple UserMenu.ini files (for example usermenu_doc.ini, usermenu_audio.ini, ..), each one has in it at the start a filter for what type of files it's active, something like :

Also, there should be the possibility to include one usermenu in another, that way we could make a usermenu with generic commands (that apply to all files) and include it in all the other menu files.

I'm not exactly sure how this should work when multiple files are selected, since the files might respect different filters.
Also there could be 2 menu's that apply to the same file because of the filters, maybe in this case it should show a menu containing both usermenu's (maybe as submenus ?)

For now I have one usermenu with all the commands that i might apply to files, but it's not the best idea since i have audio editor, video editor, image editor, hex viewer, office viewer/editor commands and a few more and of course most of those commands don't apply to most of the files.

Another idea would be to have a plugin or program (maybe a LUA script ?) that would be called from the usermenu and depending on the file name/type would show a customizable menu for further commands, that way in the usermenu.ini file i would only have one entry : "view.exe !.!" that would call the plugin/program/script.

Is this possible and if not then what do you think should it be possible to be done in FAR or it's not something you would use.

Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA

Raistlin wrote:cyberwolf
File Associations don't suit your needs? You can get everything you mention using them, except the case with multiple selection.

I have never worked with File Associations, so my question might be stupid, but can i show a menu with multiple options for a file ?
For example for cpp files i would need to add the following shortcuts : text editor, Visual Studio, SVN/VCS checkin/checkout, hex editor and for images i have about 6 or 7 programs. I would like to have one shortcut that shows all the options i can have for that file.

I would prefer one shortcut that shows a menu because there are filetypes that i work rarely with and if i have 6 shortcuts (like in the File Associations) i will most likely not remember what each shortcut does (I don't have a very good memory )

HaRT wrote:The ANSI version of the plugin should work in FAR3.

As I was writing the response I just realized that the Format Menu 0.5 version IS and ANSI version so it would work on FAR3 without anything else (like wrappers or stuff). I was confused since the plugin doesn't show up on the Options->Plugins Options but it does show up on the Plugins list and works correctly.

Thanx for your help.

Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA

I have never worked with File Associations, so my question might be stupid, but can i show a menu with multiple options for a file ?

Sure. Creating more than one association with "rare" actions defined for the same key combination (you may choose from Enter, Ctrl-PgDn, F3, Alt-F3, F4, Alt-F4 - I prefer Alt-F4) will give you the menu.

I have never worked with File Associations, so my question might be stupid, but can i show a menu with multiple options for a file ?

Sure. Creating more than one association with "rare" actions defined for the same key combination (you may choose from Enter, Ctrl-PgDn, F3, Alt-F3, F4, Alt-F4 - I prefer Alt-F4) will give you the menu.

Thanx, i didn't know that, i thought that associations were unique (as in you couldn't add the same file type twice). I'll look into it, File Associations seems more versatile (since it has 6 shortcuts) than Format Menu.
Hm, i could actually combine them both (i might use the UserMenu too for some programs), I just hope I won't get lost in all the settings

Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA

IMHO you can use User Menu for this but actually have no reason - it would be just some kind of NC legacy. File Associations are surely "must use" if an action you want to automate applies to current object.

Raistlin you're right, i forgot to mention that i don't use the UserMenu to have actions according to the current file.
I use the UserMenu to start some applications that require the current folder (not the file) and also to have a list of applications that i can run (ones that do not require a file/folder, for example CCLeaner, RegCleaner, DiskDefrag and the likes).

P.S. there is one exception, i added an option to compare the current files from the active and passive panel, it could probably be accomplished with File Associations and Format Menu too since those support the "!#" sign that is used for the passive panel.

Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA