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
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5

it seems working here! Please make INI version too
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 »

v0.9 now comes with:
  • wildcard support (? and *) for extensions (thanks Ovg!)
  • added a second delay option "Open" - that waits X ms until it opens the next file. This may help with slow programs.
  • XML and INI support now included in the same download, if you want to use INI simply use F4MiniMenui.ahk instead of the regular F4MiniMenu.ahk
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
Thank a lot! I'll try :-)
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
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5
Great job!

I allowed myself to make changes in two lines 148 и 347 in F4minimenui.ahk file :

CheckFileExt:="iU)\b(" StrReplace(StrReplace(StrReplace(v.ext,",","|"),"?",".?"),"*",".*") ")\b" ; v0.9 allow for wildcards

AllExtensions:="iU)\b(" StrReplace(StrReplace(StrReplace(AllExtensions,",","|"),"?",".?"),"*",".*") ")\b" ; v0.9 allow for wildcards

Now e.g. doc? will match doc, docx, docm. Can you confirm this? For me it's working.
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
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5

I have found that all settings for F4MiniMenui are stored in XML file instead 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 »

Thanks for the bug report of the INI version, fixed that and applied your regular expression change as well in v0.91.

( I made some further changes to make it easier to maintain both versions in the future - both main scripts are now almost identical )
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

0.91 doesn't work - at start I get error: https://yadi.sk/i/Q8ptb0Q3sYjCC and the script falls into infinitive loop. Ini file surely exist in script folder and he grows with each restart of the script.
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 »

Is it possible you didn't overwrite lib\iob.ahk when you unpacked 0.91?
You can check it by opening iob.ahk in your editor and on line 17 https://github.com/hi5/F4MiniMenu/blob/master/lib/iob.ahk#L17 the word Global should be there, in older versions that was missing.

Code: Select all

iob(Filename="")
	{
	 Global MatchList:=[] ; <- Global line should there, older iob.ahk is missing Global
When I download the ZIP file and unpack into a new folder both versions seem to start and work correctly.
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 deleted old version and downloaded v.91 once more.
There is Global MatchList:=[] line (#17) in iob.ahk file, but still no luck - I've got the same error and behavior ....
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 »

Strange, I tried it with 32/64 bit and ansi.

That MsgBox is shown when it can't read the INI file or the Matchlist object is empty - to see what is in the object is always a bit tricky but I prepared something here https://github.com/hi5/F4MiniMenu/issues/7

If you'd like to try it, download the zip, unpack and start it - it should show the contents of the Matchlist object in a new window - it should be like this:
3. arr[1]
4. arr[1,"Delay"] = 0
5. arr[1,"Exe"] = c:\WINDOWS\notepad.exe
6. arr[1,"Ext"] = txt,xml
7. arr[1,"Method"] = Normal
8. arr[1,"Open"] =
9. arr[1,"Parameters"] =
10. arr[1,"StartDir"] =
11. arr[1,"Windowmode"] =
12. arr["Settings"]
13. arr[Settings,"BackgroundHotkey"] = F4
14. arr[Settings,"ForegroundHotkey"] = Esc & F4
15. arr[Settings,"MaxFiles"] = 30
16. arr[Settings,"MenuPos"] = 3
17. arr[Settings,"TCPath"] = c:\totalcmd\TotalCmd.exe
18. arr[Settings,"TCStart"] = 1
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5

I have found source of the problem - compiled version (exe) doesn't work, if i double click or press enter key on file F4MiniMenui.ahk/F4MiniMenui2.ahk it seems all work fine.

https://yadi.sk/i/_3LYxzimsbfmp - output of compiled file (exe) F4MiniMenui2
https://yadi.sk/i/pH4VQwOnsbfmL - output of F4MiniMenui2.ahk file

Bitness doesn't matter .. Any suggestions will be appreciated!


PS. I have installed AHK and now I don't use portable version, I compile via right mouse click.
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 »

Thank you very much for the information, indeed when compiled it failed as I forgot to add a check for compiled scripts as well.

In v0.92 that has been fixed so if you compile it now it will work as well.

[face=comicsansms]Thank you Ovg[/face]
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

Bingo! Now working like a charm! Thank a lot for Help!

I suspected that the case in the file name as the name of the ini file was empty, but did not realize that it is necessary to add a check for exe. Thank for useful tool!
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
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2hi5

Hi, hi5!

1. Now filelist is created in script home dir. I think it would be better to create filelist in %TEMP% dir. I have already done it for myself and could you please implement this into official distributive?

2. Now filelist is deleting upon start/close program. I think it would be better to delete filelist also after editor(s) is closed.

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?
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

1: that would be possible, I'll make a note of it and add it

2: that would be difficult as it would need to keep track of all opened programs. It might be possible to delete it sooner, I'll think about it and do some experiments.

3: Yes you can edit A (as in ONE) file in an archive. See the changelog:

"v0.51 Check if selected file(s) are archived, if so bypass F4MiniMenu all together and use internal TC Edit command to open file, this will only use the file under the cursor, not all selected files."

What happens is: it checks if the file(s) you have selected are in an archive, if so, it completely ignores F4MiniMenu settings and uses the default Total Commander Edit command. It will use the first file if you had selected multiple files in the archive.

This means the file will be unpacked by TC and opened in the standard editor which was defined by the user in TC (configuration, operation, edit/view, editor setting).
The reason for this is that it allows TC to detect when you're done editing the file and ask you if you want to update the archive with the changed file. I don't think it is possible to replicate this behaviour for multiple files and multiple editors which detect changes and ask you to update the archive when done. (too hard to figure out all the file paths in the archive etc.)
The code that handles this starts here https://github.com/hi5/F4MiniMenu/blob/master/F4MiniMenu.ahk#L131

What might be possible: allow F4MiniMenu to unpack the selected files to the %temp% folder, open this %temp% folder in a new tab in the opposite panel, open all files. After that the user would have to copy or move the files back into the archive after the editing is done.
Would that be useful? Mind you there will be some potential problems, when you copy the files from the archive, files with the same name(s) might be present in the %temp% folder which will cause a prompt from TC asking the user to overwrite/skip files. Or it could create a unique sub-folder in %temp% to prevent this but that would leave you with a folder + files to delete manually. There wouldn't be a perfect solution I think.
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