How to passing all selected files to Editor (F4)

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
slidg
Junior Member
Junior Member
Posts: 4
Joined: 2007-01-17, 06:29 UTC

How to passing all selected files to Editor (F4)

Post by *slidg »

When we press F4, TC only passing the file which under cursor to editor, but "ChoiceEditor" can retrieve all of the selected files.
For a button, maybe we can set %L as its parameter, but "ChoiceEditor" does not do that, then how to realize it like "ChoiceEditor"? who know?
Thanks!
User avatar
Flint
Power Member
Power Member
Posts: 3503
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ChoiceEditor reads the list of the selected files manually, by sending to TC cm_CopyNamesToClip or something. There is no "normal" possibility to open several files in an editor, except for using lst2multi/lst2str programs.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
slidg
Junior Member
Junior Member
Posts: 4
Joined: 2007-01-17, 06:29 UTC

Post by *slidg »

Thanks!
You are right, I found that clipboard was changed after ChoiceEditor run.
Then how to send such cm_CopyNamesToClip to TC? like this?
sendMessage(TC_hwnd, WM_COMMAND, cm_CopyNamesToClip, NULL) ?
User avatar
Flint
Power Member
Power Member
Posts: 3503
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

slidg
SendMessage(TC_hwnd, WM_USER+51, 2018, NULL);
// 2018 == cm_CopyFullNamesToClip
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

How does ListLoadNext (lister API) work? I think it wold do the same, but also inside archives \ on ftp.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2m^2
How does ListLoadNext (lister API) work? I think it wold do the same
ListLoadNext has nothing to do with cm_CopyNamesToClip.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Really?
I'll ask more precisely. Does ListLoadNext give the next file on the list or the next selected?
If selected - It can be used to retrive a list of selected files, in archives \ on ftp TC would copy everything to temp and repack the files that were modified.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2m^2
No, ListLoadNext is for different purpose at all. It's called *by TC* when you move to next file. You cannot use it to get *from TC* next name.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

I can press 'n' from inside my plugin.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2m^2
You'll get next selected name (probably).
Post Reply