how can i open a file in a built-in lister?

English support forum

Moderators: Hacker, petermad, Stefan2, white

poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

how can i open a file in a built-in lister?

Post by *poiuytr »

Is there the way to open file in a built-in LISTER in TCMD from command line or smth?
I don't want to use stand alone lister.
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 15-03-2003 23:04:00 +0000 poiuytr wrote:

p> Is there the way to open file in a built-in LISTER in TCMD
p> from command line or smth?


No way.[/face]
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

poiuytr wrote:Is there the way to open file in a built-in LISTER in TCMD from command line or smth?
About command line - see prev post, about smth - you can create a button or Start Menu entry with the following command:
cm_List C:\Poiuytr\MyGirls.txt
and optionally assign hotkey to Start Menu entry.
poiuytr wrote:I don't want to use stand alone lister.
Why?
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 17-03-2003 02:07:15 +0000 Valentino wrote:

V> Why?

It doesn't support plugins (?)...[/face]
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

2Black Dog
Supports, just copy your wincmd.ini to Windows dir (only [ListerPlugins] and [Lister] sections are needed). So currently I have two INIs: main (in TC dir) and small in Win dir (just for stand-alone lister).

I already asked Christian why stand-alone Lister takes ini from there but didn't get answer...
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 23-02-2003 22:09:42 +0000 Valentino wrote:

V> Supports, just copy your wincmd.ini to Windows dir

Yep, I had an old version. It's my turn to ask "why" then... ;)[/face]
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Valentino wrote:
poiuytr wrote:I don't want to use stand alone lister.
Why?
It's rather strange to have one program "installed" twice (tc alredy have lister) for exactly the same purposes.
Valentino wrote:Menu entry with the following command:
cm_List C:\Poiuytr\MyGirls.txt
The point is that i want to open file in lister when i press <enter> on it, but not just another button/menu command.

So is there a way?

thanx for the answers!
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

poiuytr wrote:It's rather strange to have one program "installed" twice (tc alredy have lister) for exactly the same purposes.
"Installation" is only copying about 400k file. What is 400k nowadays?
poiuytr wrote:The point is that i want to open file in lister when i press <enter> on it, but not just another button/menu command. So is there a way?
Enter launches associated program. If you make Enter to launch Lister, you'll get difficulties with launching EXE's for example, and other file types (doc in Word, etc). Why don't you want to use F3?
If you mean opening txt files then launching stand-alone lister is much faster than rising TC (if it was possible).
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 17-03-2003 18:39:44 +0000 Valentino wrote:

V> "Installation" is only copying about 400k file.

Or about 160k ASPack-compressed...
Actually I see the big advantage of using stand-alone Lister, it won't close if you have to close Commander.[/face]
User avatar
ben hub
Member
Member
Posts: 132
Joined: 2003-02-06, 21:47 UTC
Location: Madagascar

Post by *ben hub »

The point is that i want to open file in lister when i press <enter> on it
If you are able to press <enter>, maybe you are able to press <F3> instead ? :wink:
Benoît
# 4081
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Valentino wrote:
poiuytr wrote: It's rather strange to have one program "installed" twice (tc alredy have lister) for exactly the same purposes.
"Installation" is only copying about 400k file. What is 400k nowadays?
The key word is not "installation", the key word is twice.
Not 400kb nor 160k do not bothering me.
Valentino wrote: Enter launches associated program.
Association! I'm talking exactly about file association with builtin lister. As i can see it is impossible. Sad but true.
Black Dog wrote: Actually I see the big advantage of using stand-alone Lister, it won't close if you have to close Commander
I never close it :wink:
Gregory
Junior Member
Junior Member
Posts: 89
Joined: 2003-02-08, 10:04 UTC
Location: Kiev, Ukraine

Post by *Gregory »

Maybe someone could write small exe file, that invokes cm_list command
in TC with SendMessage. Then all you have to do is to associate that program with files you need.
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

You can send this message to TC to open the lister:

Code: Select all

wm_InvokeMenuCommand=WM_USER+51;
cm_List=903;
hTotalCmd=FindWindow("TTOTAL_CMD",NULL);
SendMessage(hTotalCmd,wm_InvokeMenuCommand,cm_List,0);
Then I thought, what if I set the lParam to a pointer that pointed to a string, which contained a valid filename. But no I didn't work :( It would still open lister, and load the file under the cursor. All this you ask for could be done if this was possible.
Last edited by Aezay on 2004-09-30, 21:34 UTC, edited 2 times in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No it couldn't, because you cannot pass the DATA to which the pointer points to! It would be in a different address space (that of your program), except if you write a plugin...
Author of Total Commander
https://www.ghisler.com
wOxxOm
Junior Member
Junior Member
Posts: 12
Joined: 2004-09-25, 17:47 UTC

Post by *wOxxOm »

all one needs do to pass a pointer is to copy it into TC process heap using VirtualAllocEx and WriteProcessMemory, for example an AHK script:

WinGet, pid, PID, A
hProc:=DllCall("OpenProcess", "uint", 0x38, "int", 0, "uint", pid) ;PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION
pRB:=DllCall("VirtualAllocEx", "uint", hProc, "uint", 0, "uint", 300, "uint", 0x1000, "uint", 0x4) ;MEM_COMMIT, PAGE_READWRITE
DllCall("WriteProcessMemory", "uint", hProc, "uint", pRB, "str", CurFile, "uint", strlen(CurFile)+1, "uint", 0)
SendMessage, 0x433, 903, pRB,,A ; TC=active window currently
DllCall("VirtualFreeEx", "uint", hProc, "uint", pRB, "uint", 0, "uint", 0x8000)
DllCall("CloseHandle" , "uint", hProc)

Yet TC does not check currently for the parameter being passed... so no luck's here
Post Reply