F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *AntonyD »

v1.42 @
https://i.ibb.co/3sDD49Q/2024-03-14-152618.png
but why is so big diff?
also - why not all standard fields of this FileInfo structure are filled?

https://i.ibb.co/Y8928W2/2024-03-14-153039.png
what should happen when I will click this menu item?
does it correlate with some settings item?
#146217 personal license
User avatar
st
Junior Member
Junior Member
Posts: 85
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *st »

hi5 wrote: 2023-07-18, 16:41 UTC @st

You don't setup F4MiniMenu-64.exe as "editor" in the configuration.

F4MiniMenu is a program that runs on its own and sit in the tray menu waiting for Total Commander (and others if you've set it up) windows to be Active and defined hotkeys to be pressed to take action.

So, in your case remove any "editor" settings in Double Commander. Start F4MiniMenu-64.exe, in the tray menu click on the F4MM icon, settings, and press ctrl-shift-c in the Double Commander control (at the bottom, Other programs group). Click OK.

Now the F4 and Esc+F4 hotkeys should work in Double Commander. It might be easiest to setup your first (few) editors via the Tray menu (right click, configure editors) - or you can use Esc+F4 and a popup menu with options (incl. an option "Add new editor") should appear.

Now you can work with F4MM in Total Commander and Double Commander. Note that not all functions may work correctly with Double Commander.

You may not need F4TCIE-64.exe at all, but you could try use it and define it as editor in Double Commander, I haven't actually tested it with files in archive and FTP so no guarantees - details here https://github.com/hi5/F4MiniMenu#helper-script-f4tcieahk
But you need to define the editors using F4MiniMenu-64.exe first, if there are no editors, F4TCIE-64.exe won't be able to find them and you can't use F4TCIE-64.exe to set them up. (Although in theory you could manually create an ini file but that would be tedious)

Hope this helps.
Because ^shiftC is by default the shortcut key to cm_CopyFullNamesToClip in double commander.
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *AntonyD »

2hi5
Ouch, I just notice that you still not answered pretty simple questions from above:

https://i.ibb.co/3sDD49Q/2024-03-14-152618.png
but why is so big diff?
also - why not all standard fields of this FileInfo structure are filled?

https://i.ibb.co/Y8928W2/2024-03-14-153039.png
what should happen when I will click this menu item?
does it correlate with some settings item?
#146217 personal license
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hi5 »

st wrote: 2024-09-06, 04:02 UTCBecause ^shiftC is by default the shortcut key to cm_CopyFullNamesToClip in double commander.
Exactly, I'll add the additional info to the readme and settings in a future update. It is visible in the help (the green ?) in that section already.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
hpcex
Junior Member
Junior Member
Posts: 3
Joined: 2021-06-14, 06:22 UTC

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hpcex »

Thanks to the author for bringing such a good tool.

But i have a question,when i add a new exe to menu,a window will appear to ask me to set or find a ini file ?
I don't understand what this ini means. Is it the ini of f4minimenu? Or the ini of the added software? Or the ini of totalcmd?

If I cancel this ini adding window, I will find that the exe is not added successfully either.

[img]https://s21.ax1x.com/2025/01/10/pECTUn1.png[/img]

[img]https://s21.ax1x.com/2025/01/10/pECT0AK.md.png[/img]
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hi5 »

v1.43 @ https://github.com/hi5/F4MiniMenu should fix the problem reported by hpcex https://github.com/hi5/F4MiniMenu, bug introduced in v1.42 so advised to upgrade. (Adding a new editor didn't work correctly, should work as intended now)
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
hpcex
Junior Member
Junior Member
Posts: 3
Joined: 2021-06-14, 06:22 UTC

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hpcex »

Thanks for upgrading the software, the bug has been fixed and it is working normally.
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hi5 »

Thank you for testing hpcex!
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *AntonyD »

2hi5
I'm sorry for the possibly very strange question. BUT I just got confused easily and couldn't find a way out in logic.

WHAT is "Background Mode (direct)" option and HOW does it work?
The question and my problems started at the moment when I upgraded to the new RC4 version of Total. And suddenly when calling by F4
my text editor - it did not open on the required TXT file. I've double-checked everything I could think of...
Everything seems to work individually, but not together.
And at the last moment, I remembered about your program, went into the settings, saw this hotkey that was linked to this option.
I have temporarily disabled all hotkeys and ... F4 on files began to open 'em easily as before.
At first, I wanted to post it just like a bug in the your program - because suddenly something was changed in the Total code,
which became incompatible with the utility code...
But then I just realized that I initially did not understand the essence of this option((((.
Maybe I've just been doing something wrong all this time? And it's just my fault for not getting everything set up right.

And + I still don't understand HOW and THROUGH what the utility can (as stated) work with Everything.
Pressing F4 in that program is clearly not intercepted by the utility, but is executed by the same program.
#146217 personal license
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hi5 »

Starting from a clean slate:

1. Close/Exit F4MM
2. TC, Configuration, Edit/View, Editor for F4 Editor, set it to:

Code: Select all

notepad.exe
Now when you press F4 on any file it tries to open it in notepad.exe, this is the default TC behaviour.

F4MM:

3. Start F4MM, it now sits in the system tray and waits for TC and "other programs" to be ACTIVE and Hotkeys to be pressed.

-> Assuming your hotkey setup is still empty, pressing F4 will still open notepad. Also expected and correct.

4. Setup the hotkeys again: F4MM Traymenu, Settings, use defaults (you can change it later if you want):

Code: Select all

Background mode (direct) [empty] [F4]
Foreground mode (menu):  [Esc]   [F4]
Filtered mode (menu):    [Esc]   [F1]
Now when you press F4 on one or more a file(s) in a panel, F4MM comes into play.

NO MENU IS SHOWN as this is the "background mode" (= open files directly, no menu):

F4MM will check if it can find a program associated with (each of) the extensions, if so open the program using a first come, first serve.

This means: for example 4 editors associated with .txt files? use the FIRST one it finds from the order set in the list that can be found in the "configure editors" screen, there is no option to select an editor.

NO program found? Use the default program (Set in F4MM Settings, and is also the first one in the list that can be found in the "configure editors" screen)

+ Pressing F4 should also work with IN a separate lister window and QuickView (can be turned on/off in Settings, Elsewhere in TC)

+ IF you have ticked the boxes in "Other programs", F4 also works in Double Commander, Everything etc... that is because F4MM waits for the hotkeys you've set in Settings Hotkeys AND the "other programs" to be active.

Foreground mode (menu):

Press Esc & F4 now shows a menu listing all editors (in the order you've set them, see configure editors). That way you can select another program.

It will open all selected files in that program so select txt,png,docx ? it will open all three in the selected program (try to anyway)

Filtered mode (menu):

Show a menu with the default editor + all editors it can find based on the selected files extensions in a menu.
Then open all the files in the selected program.

TC ONLY: Files in ARCHIVES using F4TCIE (not required but might be preferred):

Remember you've set notepad.exe as your default editor in TC in step 2?

Test this:

Open a zip file, try to edit a file, notepad.exe will be used. That is because TC unpacks the file, then passes on the temporary path to the editor defined in the TC Settings, notepad in this case.

To use the same preferred editors for each extension defined in F4MM use F4TCIE (=F4 Total Commander Internal Editor):

5. TC, Configuration, Edit/View, Editor for F4 Editor:

Code: Select all

drive:\path-to\F4TCIE.exe or .ahk "%1"
When TC unpacks a file to the temp folder it will now pass it on to F4TCIE instead of notepad.
F4TCIE reads the configuration from F4MM and start the FIRST editor it finds for the extension.

Due to the nature of unpack & edit. It will only work on ONE FILE, nothing can be done about it (I won't attempt it anyway) -- viewtopic.php?p=444090#p444090

ADDED BONUS for using F4TCIE:

When you create a new file it will open it in the first editor for that file type.

OPTIONAL: DocumentTemplates -- https://github.com/hi5/F4MiniMenu/tree/master/DocumentTemplates

There are 5 other alternatives that I know of, links in the first post viewtopic.php?t=35721 perhaps they do a better job depending on user preference and usage.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *AntonyD »

Yes, I saw these other variations of the essence of your brilliant tool - but all of them are one way or another,
but they worked not as stable as yours.

And only now (after a few years at least) something incomprehensible is happening now.......
If after the translation I understood everything correctly then we definitely have a stable reproducible bug now.

The program does not respond to pressing F4 strictly in one (at least - but possible somewhere else) ordinary folder:
I:\Windows Kits\10\Include\10.0.22000.0\um\dwmapi.h
No matter how many times in a row I will press F4 - the corresponding default text editor is not called.
If I move the file to the level above - everything works ...

And if I call the editor with the button from the Total panel on the same file - everything starts/opens.
Only calling from within your utility does NOT work. And it doesn't work - even if I call from inside
"Filtered mode (menu)" corresponding item. Even If I choose another editor from this menu which
by itself nature can easily open such files.

P.S. Clarification - as an example is given 1 file - but the error is triggered on all files, what is there.
Of course, I did not check all 2164 files - but I checked a lot of header files.

Maybe I can turn on some utility logs - to check the essence of the call and is it really happening?

P.S. As for what I asked at the end of my post:
And + I still don't understand HOW and THROUGH what the utility can (as stated) work with Everything.
Pressing F4 in that program is clearly not intercepted by the utility, but is executed by the same program.
it's still relevant. You're just saying that's where it works. But why?
For example, in "Everything," pressing F4 is ALWAYS tied to an internal action.

Code: Select all

F4 = Focus Next Selected
https://www.voidtools.com/forum/viewtopic.php?f=12&t=10628
And it logically CANNOT be overridden in your utility. Because pressing that combination is important in exactly
that - in the other program.
So why the "Background mode (direct) [empty] [F4]" can be applied in such scenario? In another program?
#146217 personal license
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hi5 »

In general if the other program is running as admin or a folder needs special access permissions, it is most likely F4MM may not work as the F4MM shortcuts won't be seen in such programs. And running F4MM ad administrator is not advised as it will launch all programs as admin which is not recommended practice.

Re Everything, I'm not aware of F4 being a valid shortcut in my Everything Version 1.4.1.1024 (x64) - it doesn't do anything afaik - I don't even know what focus next selected means. I open everything by double clicking the tray icon and not via the start menu or program files. If you can change shortcuts in Everything you could perhaps temporarily disable F4 just to test it. If it works you can either choose another shortcut for F4MM or the command in everything.

Re the Windows Kit folder: when I recreate the path it works, so I can only assume something is special about that folder perhaps owner/user rights or something similar - if TC has permission to access it it can launch programs to open them (obviously) but as F4MM goes "outside" of TC the editor isn't launched by TC but by F4MM so it doesn't inherit the same rights -- for fun you could try to use F4MM as a button or start menu (just be sure to not call the edit settings options while F4MM is also running, opening a program should work - only use the %L /P? /M? parameters not /ED and /SET) -- https://github.com/hi5/F4MiniMenu?tab=readme-ov-file#passive-use-in-button-start-menu-user-cmd (I haven't tested in a while but should still work)
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *AntonyD »

Regarding work as an administrator - no - I do not practice this and do not do it on an ongoing basis.
And my current case also applies to the work by an ordinary/regular user.

EVERYTHING - Now I am using version 1.5. By the link, what I provided above to the website of the developer of this program - there
You should have seen - how many hotkeys NOW supports that program. Therefore, the question is already turning into a proposal, IMHO:
IF you say that your utility can work in other programs, then you NEED TO immediately - either in a tooltip, or in a special button (?),
by pressing which the dialog with explanations would be opened - where all those circumstances were stated by which the current
version of the utility works. Approximately as you did it in your very useful post above.
So that then it can be immediately understand from this text that since the utility reserves those hotkeys that the user puts up at the
'Configure Editors' setting-dialog, then the same hotkeys should NOT EXIST in those programs - compatibility with which is declared*.
You've already done this next to the Explorer option, but it's not very clear what it says.
And there is no clarification that Everything has potential compatibility issues now.
so I can only assume something is special about that folder perhaps owner/user rights or something similar - if TC has permission
to access it it can launch programs to open them
I also initially thought so - but all the checks that could be performed relative to this final folder or its parent ones showed,
that there are no differences.
Everything is available at the level of an ordinary user. And in no way to clarify in any way, it is impossible to clarify the fact
that "inside" this folder the calls do not work, but in "outside" folders they do work...

Regarding of the reproducing of the bug. Have you reproduced the number of files in the folder? IF suddenly this is what the influence has?

And about at least some log abilities? - can you introduce them? To at least read the results of a function that been used for a direct call
of the final command line for this file and the selected editor.

P.S. ooooooo! I forgot to test the direct pressing of the "F4 Edit" button on the Total panel!
And when I did it now, it turned out that the corresponding editor is starting!!!
Those can we conclude that in some way the support of the hotkey ​​call in this folder "broke down" only?


P.P.S.
By the way, you wanted to know what exactly pressing F4 does in another program.
IF you select different rows in different places of the search results output table and filter out the necessary files/directories,
they will all be highlighted/selected, BUT! the input focus will belong to only one entry out of all the selected ones.
And with this hotkey, you can move the input focus between the selected lines.

P.P.P.S.
*
Perhaps it would be most acceptable if you could enter all the current combinations supported by
that program, and for 'F4'-case to display a hint RIGHT now that this WILL NOT work in Everything version 1.5,
and when user will entering other combinations of hotkeys, display a hint if the entered hotkey intersects
with those that you have added to the list of "bans"...
#146217 personal license
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *AntonyD »

I found another case of incomprehensible behavior.
The first (default in your terminology) editor is set as 'notepad '.
Another editor, XMLnotepad, is set to process XML files.

IF I call the editor with the F4 hotkey over qwe.xml file in a Totals file panel, then
the 'notepad' editor opens for me for some reason. Your described logic did not work(((
But if I press the 'F4 Edit' button on the Total panel, then your logic that you described
above will work and another editor will be called - XMLnotepad.

If I will call 'Filtered mode (menu)' over that XML file - then I will see BOTH editors,
one above another:
Notepad
----------------
XMLNotepad

BUT I assume that the first record does not mean that this editor should be called.
It ONLY shows that there IS the default editor set at the global settings. And This
editor could BE called. BUT because we process XML extension for which precisely defined
XMLNotepad editor exist in a form of the second item in this menu - so THIS editor and
will be in a final moment called over selected XML file by F4 hotkey. Am I right?
BUT I have a feeling that the described "Background mode (direct) works on this menu - just
by selecting the first editor from the list. No matter what there is more suitable for our
conditions....
#146217 personal license
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)

Post by *hi5 »

Just pressing F4 simply opens the FIRST PROGRAM it finds a match for, so double check the settings of the default editor (which you say is notepad) that you haven't assigned XML to it - My default editor has these ext. assigned to it for example

Code: Select all

txt,ahk,(as|p)p,(j|c)s*,php,ini,[sh]tm[l]
Perhaps you can post what you have for notepad and xmlnotepad
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Post Reply