Page 2 of 8

Re: MultiRenameTool to mark files that match filter

Posted: 2022-05-26, 06:40 UTC
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.

Re: MultiRenameTool to mark files that match filter

Posted: 2022-05-26, 08:46 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-05-26, 19:10 UTC
by jbcb
Yes please.

Re: MultiRenameTool to mark files that match filter

Posted: 2022-05-27, 08:52 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-05-27, 15:51 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-05-28, 07:30 UTC
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

Re: F4 from Lister to Editor

Posted: 2022-08-19, 09:08 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-08-19, 21:08 UTC
by jinsight
Support++ launching editor from viewer using F4 hotkey

Re: F4 from Lister to Editor

Posted: 2022-08-21, 09:07 UTC
by guRed
My vote for this feature!

Re: F4 from Lister to Editor

Posted: 2022-08-21, 18:34 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-08-21, 19:52 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-08-22, 07:15 UTC
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

Re: F4 from Lister to Editor

Posted: 2022-08-24, 02:18 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-08-24, 10:46 UTC
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.

Re: F4 from Lister to Editor

Posted: 2022-08-24, 11:34 UTC
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