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: white, Hacker, petermad, Stefan2

Post Reply
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

Ovg wrote:2hi5 3. It is possible to edit files within archives? Now i can't. I press F4, files are extracted but editor(s) don't start ... May be I'm missing something?
@Ovg (and others of course) you can now try a helper script I've made earlier today that will read the settings and try to open the preferred editor when editing files from archives and FTP. It also works when you create a new file (shift-F4) but of course the target program has to accept "new or empty files" - for example notepad will allow this, but your graphics program of Office word processor will probably generate an error message.

Zip here:
https://github.com/hi5/F4MiniMenu/issues/13
Last edited by hi5 on 2017-07-02, 18:45 UTC, edited 1 time in total.
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
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

Hi hi5

Thank you for developing and support! I'll check you script.

Now for this I use my own script. I wrote this after my question and your answer. The script is configured as an editor for TC, reads the same ini and starts after pressing F4 inside the archive, but perhaps your script will be better and more convenient than mine.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

@Ovg that's basically what the new script does. All I am going to do is clean it up a bit and #include some more code. So the script itself will be very short - half of what is now - as I copied some code from the main script for testing but it is easy to #include (all the blocks marked with dup ... /dup. Easier for maintenance in the future :-)

But if your own script works, by all means keep on using it. If it works, it works.
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
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5

I have tested your script and found:
if there is not extention in ini file, instead of default editor (editor #1) the last editor is starting up. F4MiniMenu working fine with the same ini.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

Ovg wrote:if there is not extention in ini file, instead of default editor (editor #1) the last editor is starting up.
Good find, as I don't have entries with no extensions assigned to them I wouldn't have found it myself.
Fixed it, you can download a new zip here.

edit: grammar typo fix
Last edited by hi5 on 2017-07-03, 16:36 UTC, edited 1 time in total.
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
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5
Many Thanks!
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

An experiment using DocumentTemplates for new files (shift+f4 in TC), script name is now F4TCIEx.ahk so don't have to overwrite version 0.2 from the post above.

As mentioned earlier: the target program has to accept "new or empty files" - for example notepad will allow this, but your graphics program of Office word processor will probably generate an error message as it doesn't "understand" the new empty file.

To solve this problem you can place templates in the DocumentTemplates folder.
Create a new document in your preferred program, say a 100x100 bmp file in MS Paint. Save it as "template.BMP" in the DocumentTemplates folder. At the moment you need to modify a variable in the script (just during the test phase) line 29 "templateExt" and add ",bmp" (so a CSV list of extensions).
Now when you make a new BMP file, that template.bmp will be copied to the active folder/panel first before starting the editor. In the zip on GH there are three templates included XLSX, PNG and RTF to illustrate how it works.

https://github.com/hi5/F4MiniMenu/issues/13#issuecomment-313842296
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)
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

Update v0.95 https://github.com/hi5/F4MiniMenu
  • Added Helper script F4TCIE (used by internal edit command for ZIP/FTP)
  • Added DocumentTemplates (shift+f4, create new files, requires use of F4TCIE)
  • Brand new fresh shiny icon 8)
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
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

hi5 wrote:
Thank you! Looks very nice :D :mrgreen:
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

For those wanting to try it but don't (want to) use AutoHotkey, compiled versions can be downloaded here:
:arrow: https://github.com/hi5/F4MiniMenu/releases
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)
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

I'm also gathering suggestions which I may or may not add at some point, you can see them on GH here https://github.com/hi5/F4MiniMenu/issues - these include:
  • Statistics
  • Filtered menu
  • Additional condition to open file in an another editor (file size, date, ...)
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)
Axis
Junior Member
Junior Member
Posts: 88
Joined: 2015-07-14, 18:53 UTC

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline

Post by *Axis »

Hi to all.

Once I used F4MiniMenu, Am I forced to close his process manually?

Will there ever be an F4's native and enhanced version (by main developer)?

For now I'am forced to use the old (and with some bugs) F4Menu.


Thanks
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline

Post by *Ovg »

You can DIY:
1. Close F4MiniMenu
2. Create file Check4TC.ahk in inc subfolder of F4MiniMenu folder with following lines:

Code: Select all

Check4TC:
Process, Exist, TotalCmd64.exe
Err64 := ErrorLevel
Process, Exist, TotalCmd.exe
If !ErrorLevel and !Err64
  ExitApp
Return
3. Add line

Code: Select all

SetTimer, Check4TC, 5000
to the F4MiniMenu.ahk before line

Code: Select all

global AllExtensions:=""
4.Add line

Code: Select all

#include %A_ScriptDir%\inc\Check4TC.ahk
to F4MiniMenu.ahk before line

Code: Select all

#include %A_ScriptDir%\inc\Menu.ahk
5. Restart F4MiniMenu
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
Axis
Junior Member
Junior Member
Posts: 88
Joined: 2015-07-14, 18:53 UTC

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline

Post by *Axis »

Ovg wrote: 2019-05-13, 18:26 UTC You can DIY:
Hi Ovg.
Unfortunately I don't know Autohotkey and its syntax and I also don't know if what you wrote could be applied to the compiled version that I would like to use (for portability too).

Thanks
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline

Post by *Ovg »

I use compiled version. At step 5 recompile program.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
Post Reply