F4 from Lister to Editor

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
funkymonk
Senior Member
Senior Member
Posts: 410
Joined: 2013-12-04, 09:56 UTC

Re: MultiRenameTool to mark files that match filter

Post by *funkymonk »

petermad wrote: 2022-05-25, 23:27 UTC Support++ It is fine with me that i can only launch the configured editor for F4 - that's what I would nedd 99% of the time.
Support++
That would also be sufficient for me. It would be nice to decide whether lister shall be closed or stay open once the editor is launched.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: MultiRenameTool to mark files that match filter

Post by *Horst.Epp »

funkymonk wrote: 2022-05-26, 06:40 UTC
petermad wrote: 2022-05-25, 23:27 UTC Support++ It is fine with me that i can only launch the configured editor for F4 - that's what I would nedd 99% of the time.
Support++
That would also be sufficient for me. It would be nice to decide whether lister shall be closed or stay open once the editor is launched.
If Lister is left open may give problems as the plugin may not be able to update its display
with the new content changed by the editor.
For this reason my AHK script closes the Lister when the editor is launched.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
jbcb
Junior Member
Junior Member
Posts: 31
Joined: 2013-08-30, 06:43 UTC

Re: F4 from Lister to Editor

Post by *jbcb »

Yes please.
User avatar
funkymonk
Senior Member
Senior Member
Posts: 410
Joined: 2013-12-04, 09:56 UTC

Re: MultiRenameTool to mark files that match filter

Post by *funkymonk »

Horst.Epp wrote: 2022-05-26, 08:46 UTC If Lister is left open may give problems as the plugin may not be able to update its display
with the new content changed by the editor.
In fact, that could even be intended (to still see the previous version while editing).
However, I would also prefer to have lister closed when opening the editor.
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: F4 from Lister to Editor

Post by *petermad »

I would also prefer to have lister closed when opening the editor
Or make that configurable. As long as Lister doesn't block the editor from saving changes.
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
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4 from Lister to Editor

Post by *hi5 »

Horst.Epp wrote: 2022-05-24, 18:33 UTC Here my working version which uses Akelpad, but this doesn't matter.

Code: Select all

 ; Open AkelPad on F4 in Lister window.m
 #IfWinActive,ahk_class TLister
 f4::
    WinGetTitle,title
    left := InStr(title, "[") + 1
    right := InStr(title, "]") - left
    StringMid, path, title, left, right
    WinClose
    Run,C:\Tools\AkelPad\AkelPad.exe %path%,
    WinActivate,ahk_class Akelpad
    return
This also fails for files with [ ] in names for example:
[up]-down (1).txt
I'm using this for now, seems to work OK
WinGetTitle,title, Lister
path:=RegExReplace(title,"U)^.*\[(.*).$","$1")
MsgBox % path
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
jbcb
Junior Member
Junior Member
Posts: 31
Joined: 2013-08-30, 06:43 UTC

Re: F4 from Lister to Editor

Post by *jbcb »

That's a great suggestion. I often need to edit the displayed file too. The F4 keyboard shortcut in Lister would be very useful.
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: F4 from Lister to Editor

Post by *jinsight »

Support++ launching editor from viewer using F4 hotkey
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
guRed
Junior Member
Junior Member
Posts: 5
Joined: 2018-05-16, 09:05 UTC

Re: F4 from Lister to Editor

Post by *guRed »

My vote for this feature!
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: F4 from Lister to Editor

Post by *jinsight »

Re AppLoader

After opening a Lister window with F3, how do you configure AppLoader to be able to then hit F4 and open the default editor?

Thanks. Any help appreciated.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: F4 from Lister to Editor

Post by *Horst.Epp »

jinsight wrote: 2022-08-21, 18:34 UTC Re AppLoader

After opening a Lister window with F3, how do you configure AppLoader to be able to then hit F4 and open the default editor?

Thanks. Any help appreciated.
AppLoader has no such function inside of a Lister window.
Use the AHK script from this thread and you have the function you want.
You can modify it to load Apploader instead of a Editor.
This way the normal logic of AppLoader will work.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2248
Joined: 2020-01-18, 04:03 UTC

Re: F4 from Lister to Editor

Post by *Fla$her »

jinsight wrote: 2022-08-21, 18:34 UTCAfter opening a Lister window with F3, how do you configure AppLoader to be able to then hit F4 and open the default editor?
You won't open the default editor. But you can set up associations in [Editor] section in AppLoader.ini that will completely duplicate these calls. Or you can associate the opening with extensions settings of an external viewer in TC (Alt+F3 by default) if you set UseTCExtensions=1. See ReadMe, everything is described in detail there.

To call Apploder by F4 from Lister, the following values must be set:

Code: Select all

[HotKeys]
AppFromLister_key=115
AppFromLister_mod=0
Overquoting is evil! 👎
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: F4 from Lister to Editor

Post by *jinsight »

2Horst.Epp

Your AHK script works well with file names with no spaces. It fails with file names with words separated by a space. It then wants to open a file with only the first word in it which does not exist.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: F4 from Lister to Editor

Post by *Horst.Epp »

jinsight wrote: 2022-08-24, 02:18 UTC 2Horst.Epp

Your AHK script works well with file names with no spaces. It fails with file names with words separated by a space. It then wants to open a file with only the first word in it which does not exist.
No that doesn't happen here !
I have may files with spaces in its name and they all work.
Please note that I have applied the suggestion from hi5 from above.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: F4 from Lister to Editor

Post by *Hacker »

jinsight,
This is what I am using:

Code: Select all

#IfWinActive, Lister - ahk_class TLister
F4::
	WinGetActiveTitle, FileName
	WinClose, A
	FileName := SubStr(FileName, 11, -1)
	DirName := RegExReplace(FileName, "(.*\\).*", "$1")
	Run, C:\Programy\Notepad3\Notepad3.exe "%FileName%", %DirName%
Return
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply