The command cm_UnloadPlugins will unload all plugins. You can send TC the following command:
wm_InvokeMenuCommand=WM_USER+51
with WPARAM set to the command you want to pass to TC.
Many thanks for such information. I can now include internal commands of TC in scripts I write with PowerPro.
I wonder if there are other actions that can be done in TC in that way.[/b]
I thought about making a program where u could write scripts for TC, but there doesn't seem to be any way to get a list of the files in the left and right listboxes.
What I did was to send TC the LB_GETTEXT message with an index within range of the number of items in that listbox. I set wParam to a buffer[512] i think, just to be sure i had enough, but for all items it only returned 4 bytes with the same value (can't remember what).
I just want to know if there is any way of getting all the filenames in the listboxes? If not, would u consider adding better support for 3rd party tools Christian?
Of all the planets I've been to, this one is my favorite.
What I did was to send TC the LB_GETTEXT message with an index within range of the number of items in that listbox. I set wParam to a buffer[512] i think, just to be sure i had enough, but for all items it only returned 4 bytes with the same value (can't remember what).
Sorry, TC uses an owner-drawn listbox, you can't get the file names this way. Please don't try such things, instead use a button with the %L parameter.
Unfortunately not - there is no function to get these names. The above plugins are indeed very special, and the plugin interface isn't ideal for their implementation...
VadiMGP wrote:Cristian, if it possible to send in that way to TC commands contained string? Like "cd" command or "notepad %p%n"?
No, you need to call totalcmd.exe with /O switch and some other command line parameters to do this. This actually uses WM_COPYDATA to pass the names to the already running Commander, because WM_COPYDATA is the only Windows message to pass string data between programs!
ghisler(Author) wrote:This actually uses WM_COPYDATA to pass the names to the already running Commander, because WM_COPYDATA is the only Windows message to pass string data between programs!
So what will happen exactly if I send WM_COPYDATA to Commander?
Please don't do it directly, it may change in the future. It's used to change the current directories, but this can be achieved by calling TC with the /O option too.
Direct call of WM_COPYDATA has one advantage. If I have several instances of Total Commander opened I can choose in which one directories should be changed (e.g. in active Commander).
So I have a wish for a new command line switch that changes directories in current Total Commander window.
Er... Even two wishes. Second wish is about another switch that changes directory in active panel.