Hi,
It will very useful, if the commands were accepting parameters. Probably not all the commands, but some of them:
1) It allows to add new functions:
cm_50percent OR cm_50percent() .. Default mode (50/50)
cm_50percent(20/80) .. Show left 20% right 80%
2) It allows to substitute olds commands:
cm_Show(left, brief) .. Show left window in brief mode like cm_LeftShort
cm_Show(right, comments) .. Show right window in comments mode like cm_RightComments
I'm sure of the fact that you will find more uses of this system.
Joaquin
3) It allows to create a new command to execute anothers commands:
cm_Execute(cm_50percent(20/80), cm_Show(left, brief), cm_Show(right, comments)
OR execute from file:
cm_Execute(@file.ext)
Add parameters to the commands
Moderators: Hacker, petermad, Stefan2, white
Good idea---
2Jqn
Hi Joaquin!
• A good idea in the principle, I support it.
¤ But I don't know if it could be supported by Delphi2™ ?
KR
Clo

• A good idea in the principle, I support it.
¤ But I don't know if it could be supported by Delphi2™ ?

Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
The cm_xxx commands are menu commands. They can be assigned to menu item if you write your own main menu (see Total Commander Help 4.c. Change main menu). That is why they do not accept parameters.Jqn wrote:It will very useful, if the commands were accepting parameters. Probably not all the commands, but some of them:
The menu commands are also made available as command in the button bar etc. If it is at all technically possible to let the menu commands accept parameters, I think this is not the thing to do. It is better to create a new internal command.
There are already some internal commands which are not menu commands. Examples: "cd", "appendtabs", "zipfromlist", "ftpopen". These commands do accept parameters.
I have also made some suggestions for the internal commands here (see point 6).
Do you know for sure he uses Delphi2? I know about the text in the help file:Clo wrote:¤ But I don't know if it could be supported by Delphi2? ?
Maybe it just says Total Commander was originally developed using Delphi2. Maybe it says nothing about what (version of) software is used when the program was developed further.Development of Total Commander
Total Commander was written utilizing Borland Delphi 1.0 (16 bit) and 2.0 (32 bit) (© 1993-96 by Borland International).
2Clo BTW. Did you receive my email?
Not received
2white
Sorry, no. I just checked my mail-box: nothing... but spams!
• Please, send it again, and place a TC- as the beginning of the subject.
• You may try too directly: charriesatwanadoodotfr
EDIT: about the subject
• Though I'm not a programmer, I know that Delphi 2 ™ is pratically the same than Delphi 1, but in 32-bit, hence without the 16-bit restrictions (names lenght, spaces in names etc.)… So, to transform the first 16-bit version into 32-bit wasn't very difficult, I guess.
• Most certainly, Mr. Ghisler has the most recent Delphi editions! But they are very different...
¤ An example: a friend programmer had to upgrade a Delphi 1 program (HTML editor) into Delphi 5: that needed a full codes new writing. Then, one year of tests and updates to get a soft usable by everybody…
• These new Delphi softs allow to add many "cosmetic-things" in the program, but I don't think that it's desirable for TC; it must remain still a great and powerful tool, not becomes a X-Mas fir-tree! Of course, the authors are not forced to add a lot of "nice-to-have" in excess…but it's still tempting, moreover when it is possible!
• Soon or later, the whole TC shall be written again in a newer Delphi - perhaps, it's only my opinion -, but it's a huge work, not indispensable while the current writing has not reached the Delphi2 limits.
Kind regards,
Clo
Hello!Did you receive my email?

• Please, send it again, and place a TC- as the beginning of the subject.
• You may try too directly: charriesatwanadoodotfr
EDIT: about the subject
• Though I'm not a programmer, I know that Delphi 2 ™ is pratically the same than Delphi 1, but in 32-bit, hence without the 16-bit restrictions (names lenght, spaces in names etc.)… So, to transform the first 16-bit version into 32-bit wasn't very difficult, I guess.
• Most certainly, Mr. Ghisler has the most recent Delphi editions! But they are very different...
¤ An example: a friend programmer had to upgrade a Delphi 1 program (HTML editor) into Delphi 5: that needed a full codes new writing. Then, one year of tests and updates to get a soft usable by everybody…
• These new Delphi softs allow to add many "cosmetic-things" in the program, but I don't think that it's desirable for TC; it must remain still a great and powerful tool, not becomes a X-Mas fir-tree! Of course, the authors are not forced to add a lot of "nice-to-have" in excess…but it's still tempting, moreover when it is possible!
• Soon or later, the whole TC shall be written again in a newer Delphi - perhaps, it's only my opinion -, but it's a huge work, not indispensable while the current writing has not reached the Delphi2 limits.

Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials