F4Menu for all v0.58

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Shanny
Member
Member
Posts: 177
Joined: 2003-02-24, 08:38 UTC

F4Menu for all v0.58

Post by *Shanny »

F4Menu
Download: http://www.shannycn.com/f4menu

[2010-11-30 0.59]
+ F4Menu.ini [Option] UseWinAssoc=0 In background mode use Windows associated editor to open the file which has no internal associated editor (thanks to MVV@tc)
+ Improve the reliability of shortcuts handling (thanks to Daocang@newsmth)
* Language update: Russian (thanks to MVV@tc)

[2010-11-28 0.58]
+ F4Menu.ini [Option] ShowMultiMatch=0 Whether to show menu in background mode when multiple editors match current file type: 1-Show, 0-Not show (thanks to MVV@tc)
+ Parameter: -b/-d/-f,Force background/default/foreground mode, regardless of the shortcut setting
! Some shortcuts such as Esc+F4 not handled correctly (thanks to happyTC@tc)
! May crash in a few cases (thanks to happyTC@tc)
! Change homepage to www.shannycn.com
! Adjust the position of menu item "More Programs"
* Language update: Romanian (thanks to eugensyl@tc)
- Remove "About" from menu

[2010-10-10 0.55]
+ F4Menu.ini [Option] ShellMenu=1 indicate whether show context menu for windows explorer
! Cannot handle the filename parameter which contains space but not enclosed by quota (thanks to Balderstrom@tc)

[2010-10-08 0.51]
+ F4Menu.ini [Option] OpenSel=0 open selected files without regard to cursor position (thanks to byblo@tc)
! Add/Remove editors does not work normally (thanks to MVV@tc)
* Language update: Danish (thanks to petermad@tc)

[2010-10-01 0.50 final]
+ Parameter mode: -p, only retrieve filelist from command line and ignore TC selection (thanks to MVV@tc)
+ Only open the focused file if it is not selected, otherwise open all selected files (thanks to MVV@tc)
+ Improve the drag experience in editors listview (thanks to MVV@tc)
! Automatic highlight may not work when the default editor is unavailable
! Drag editor may crash/damage the config file (thanks to MVV@tc)
! The focus item incorrect after drag/drop in editor list (thanks to MVV@tc)
! Set current dir as start path if the start path is null in menu mode (thanks to MVV@tc)
! For the filename only parameter, use current dir as its path (thanks to MVV@tc)
! The selection state of focued file should be restored when F4menu exit (thanks to Balderstrom@tc)
+ Parameter: -a/-r, add/remove context menu for windows explorer, temporarily

[2010-09-05 0.50 beta1]
+ Ability to customize the shortcut key! F4Menu may should be renamed (thanks to haytcb@newsmth)
+ Ability to assign a custom icon for an editor (thanks to icfu@tc)
+ Default open mode, customize the shortcut key to open files with default editor.
+ Ability to set editor to be always shown in main menu (thanks to leepg, haytcb@newsmth)
+ Highlight the proper editor when popup menu is activated (thanks to leepg)
+ Add system associated app path and param of current file in the tooltip of first menu item
+ Show file type icon of current file in the first menu item
+ Add "Associate" and "Always shown in main menu" for right-click context menu
! If file is associated with both default and common editor, default editor has higher priority (thanks to petermad@tc)
! May crash if start without configuration file
! Fix other minor errors
- Remove feature: Double press F4 to open files with default editor
+ FAQ: How to customize the shortcut key?

Screenshots
Image: http://www.shannycn.com/f4menu/img/screenshot_menu_en.png
Image: http://www.shannycn.com/f4menu/img/screenshot_settings_en.png
Image: http://www.shannycn.com/f4menu/img/screenshot_option_en.png

TODO list:
---------------
12. Ability to search editor in giving path list. (leepg)
13. check shortcuts to avoid conflict. (MVV@tc)

(DONE)9. Ability to assign a custom icon for an editor. (icfu@tc)
(DONE)11. Allow customized shortcut key

(DONE)1 Show editor path & param in tooltips (lancaster@DRL)
(DONE)2. Enable Drag&Drop to create new entries. (lancaster@DRL, icfu@tc)
3. Internal parameters %1 and %L, %l... (zeroxia@DRL, icfu@tc)
(DONE by submenu)4. Use F4 as a toggle, to show all editors, or hide unassociated
5. assign multiple extensions to single "PerceivedType". (icfu@tc)
6. Show all system registed editors of current file extension (feuvan@newsmth)
7. Allow separator on menu (zeroxia@DRL)
8. User can choose a priority to launch the associated editor program. (WatchUer@tc)
(Partial DONE)10. Ability to create sub-menu (zeroxia@DRL)


------------------------------------------------------------------------------
About F4Menu
--------------------------
As the name implies, F4Menu pops up a context menu upon pressing F4,
the user then chooses an appropriate editor for the selected file.
Certainly, it is also possible to run F4Menu in the background
without showing the menu and automatically open a file with its
associated editors.

However, from v0.50 F4Menu is no longer restricted to F4, it support
to customize the shortcut key.

F4Menu can be launched by any application, particularly it's suitable
for using as F4 Editor for Total Commander.

F4 is the shortcut key of Total Commander/TC for opening and editing
files, it invokes the specified editor to open the selected file.
Unfortunately, in TC only one editor can be assigned to F4, so it is
impossible to choose other editors for different file types, or to
select different editors for one specified file type. F4Menu is the
right tool to solve these problems.

Key Features
--------------------------
1. Press a single key and choose the best suited editor to open your
file.
2. Use different editors to open different files at the same time.
3. Press a single key to open files with default editor.
4. Selection menu supports drag-and-drop for easy reordering of items.
5. Easy to use and configure to meet your most challenging demands.

FAQ
7. How to use F4Menu in any other software?
A: Actually pressing F4 in TC just launch the specified editor F4Menu, and use the filename under cursor as its parameter.
It's the same for any other programs, just need launch F4Menu with filename or filelist as parameter, only may not use F4 as shortcut key.
For example, in Directory Opus, can create a new toolbar button, add {allfilepath} as its parameter, and assign any key as hotkey.
In windows explorer, it cannot call external programs, but we can associate files to F4Menu, then press Enter to open the file can launch F4Menu and popup the select menu.
Certainly, F4Menu also can be used in non-file manager software, for instance, it can be used as source editor of IE or Firefox, then view HTML source in them will launch F4Menu to select.

8. How to customize the shortcut key?
A: First we need to set the shortcut key for launching F4Menu in TC or other
apps, please refer FAQ7 for more details.
For example in TC, by default F4 and Win+F4 can launch the F4 editor - F4Menu,
if we need other shortcut key such as F1 in F4Menu setting, we need assign F1
as a shortcut key to launch F4Menu in TC:
TC Configuration -> Misc -> Hotkey -> Select F1 -> Set command as cm_Edit
Then in F4Menu setting, we can set F1 as the shortcut key for default open mode,
F4 for foreground mode, and any other shortcut key such as Win+F4 for background
mode.

9. How to use the shortcut key ESC+F4/F4 as before?
A: Some users are used to the old shortcut key ESC+F4/F4, actually the new version still supports it:
Just need to set 'ESC' as the shortcut key of foreground/background mode, then pressing ESC+F4/F4 can launch F4menu in different mode.
Strongly recommend to update!
Last edited by Shanny on 2010-11-30, 14:41 UTC, edited 31 times in total.
TCEE, TCPP, F4Menu -- Shanny
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Last edited by Alextp on 2007-09-15, 19:29 UTC, edited 1 time in total.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

2Alextp
If that was a question: I didn't test it and just by reading the description I know which will be my F4 choice from now on :wink:
TC for Linux please!
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Yep, that was a question to the author.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Thanks! If anyone tried this, please report it here. I cannot test it on my company machine until it proves trustworthy ;-)
I switched to Linux, bye and thanks for all the fish!
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

I am testing now :)

The one thing I cant seem to get to work is to auto open a file when there is only 1 editor for this particular extension.

Other than that it seems to work fine. Can open several different extensions with different programs. Since it doesn't use the editor set for this extension I need to choose the editor for each file I am opening. Maybe this is a bug?

The font type looks funny to me. Is this unicode heritage?

Edit: I see now that opening them without the selection menu you need to use the background mode.

Regards,

RolandD
Registered user #92105
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

Here is the Dutch translation (Base 64 encoded):

MIME-Version: 1.0
Content-Type: application/octet-stream; name="Dutch.lng"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Dutch.lng"

RHV0Y2gNCjsgRm9yIEY0TWVudSB2ZXIgMC4xMA0KOyBDcmVhdGVkIGJ5IFNoYW5ueSAoMjAwNy0w
OS0wOSkNCjsgVHJhbnNsYXRlZCBieSBSb2xhbmREDQoNCjsgTGFuZ3VhZ2UgTmFtZSAmIENvbW1v
biB3b3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pZXMgZWVuIG5pZXV3IGJld2Vya2luZ3Nwcm9ncmFtbWEgdm9vciAiKi4lcyIg
YmVzdGFuZGVuLg0KODg9SGV0IGJld2Vya2luZ3Nwcm9ncmFtbWEgIiVzIiBiZXN0YWF0IGFsLiBE
ZSBiZXN0YWFuZGUgY29uZmlndXJhdGllIGJpandlcmtlbj9cblxuSmEsIG9tIGJlc3RhYW5kIG9u
ZGVyZGVlbCBiaWogdGUgd2Vya2VuLlxuTmVlLCBvbSBlZW4gbmlldXcgb25kZXJkZWVsIG1ldCBp
ZGVudGllayBwYWQgYWFuIHRlIG1ha2VuLg==
Registered user #92105
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Danish translation can be found at http://madsenworld.dk/tcmd/f4menu_danish.zip

Som bugs:

There is an extra character (it looks like an I or an L or a |) at the end of the language description in the Options dialog.

The current language is not chosen when I open the Options dialog - so if I don't re-choose the language, F4Menu will default to English when pressing OK.

When I press F4 on a single file, the single file gets selected in TC. This is not the usual behaviour for F4 an can lead to accidental file deletion etc.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Shanny
Member
Member
Posts: 177
Joined: 2003-02-24, 08:38 UTC

Post by *Shanny »

to Alextp

F4Menu vs ChoiceEditor
Functional: F4Menu open different files by different editors, as a list or separate files, has default editor...
Performance: F4Menu is much much faster than ChoiceEditor
Mem usage: < 200k during suspend (after opening the archive file)
Usability: Show all editors in menu and highlight associated, and also providing a setting dialog.
side effect: choiceeditor will dirty the clipboard while open multiple files, F4menu will not.
UI: F4Menu always consistent with your system UI

vs OpenFileTC
Similar to above, excepting side effect
moreover, OpenFileTC is more than 1Mb, it's really too huge for such a tool,
here F4Menu is only 30Kb.
TCEE, TCPP, F4Menu -- Shanny
User avatar
Shanny
Member
Member
Posts: 177
Joined: 2003-02-24, 08:38 UTC

Post by *Shanny »

to rolandd

thanks for your translation.

How does your font looks like, is it ugly? would you please snap screen for me? thanks!
TCEE, TCPP, F4Menu -- Shanny
User avatar
Shanny
Member
Member
Posts: 177
Joined: 2003-02-24, 08:38 UTC

Post by *Shanny »

to petermad
thank your translation 2.
There is an extra character (it looks like an I or an L or a |) at the end of the language description in the Options dialog.
The current language is not chosen when I open the Options dialog - so if I don't re-choose the language, F4Menu will default to English when pressing OK.
Looks no problem on my pc, maybe it depends on the OS language, I'll try to fix it.
When I press F4 on a single file, the single file gets selected in TC. This is not the usual behaviour for F4 an can lead to accidental file deletion etc.
Thanks, I'm going to revise this feature, should also unselect when F4Menu exit.
TCEE, TCPP, F4Menu -- Shanny
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

How does your font looks like, is it ugly? would you please snap screen for me? thanks!
http://madsenworld.dk/tcmd/f4menu012.png

or with a manifest file:

http://madsenworld.dk/tcmd/f4menu012b.png

There is definitely something wrong with the position of the buttons in the bottom of the Settings dialog.

Why is the general font shown in bold?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

http://rolandd.tweakdsl.nl/f4menu.png

Something really weird just happened. I cannot reproduce it again but this is what I did:
1. Open the F4 context menu
2. Click Settings
3. Maximize the screen
4. Restore original size
5. Now the window cant be seen

I had to use a utility called forcedisplay to make them appear again to close them normally.
Registered user #92105
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

1. Please use font mapping, the included font looks terrible:
http://msdn2.microsoft.com/en-us/library/ms776266.aspx

2. Please switch to a decent INI file structure, i.e. use one section per editor instead of creating indexed entries in one single section. Although it doesn't really matter when using your inbuilt GUI config, it matters for those who prefer direct INI editing. ChoiceEditor INI structure sucks, so no need to replicate.

3. Please do not include F4Menu.ini in the archive but either rename it to something like F4Menu.ini.template or recreate it from the Exe only when no INI file exists.

Minor issue:
Use envvar %programfiles% in default INI to give an easier start.

Thanks!

Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2. Please switch to a decent INI file structure, i.e. use one section per editor instead of creating indexed entries in one single section. Although it doesn't really matter when using your inbuilt GUI config, it matters for those who prefer direct INI editing.
At least the entries for the same item are kept together in blocks:

Code: Select all

Name4=
Editor4=
Mode4=
Param4=
Type4=
(not like the mess TC sometimes makes for plugins)

3. Please do not include F4Menu.ini in the archive but either rename it to something like F4Menu.ini.template or recreate it from the Exe only when no INI file exists.
I agree!

Use envvar %programfiles% in default INI to give an easier start.
I agree too.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply