Is it possible to add cm_ with parameters in main menu ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Is it possible to add cm_ with parameters in main menu ?

Post by *jonathanpoulin »

Hello there !

Is it possible to add a cm_ command with parameters for a main menu item? I tried but Total Commander raise an error with starting up.

I would like to add a menu entry under "Files" to restart Total Commander, like that:

Code: Select all

MENUITEM "&Restart...", cm_Exit 9
TC don't like the trailing "9" (the parameter).

I tried also like that but to not avail:

Code: Select all

MENUITEM "&Restart...", "cm_Exit 9"
Maybe the only way to do it is to create a new em_ command calling the cm_ with parameters, and then add that em_ on the main menu.
Thanks,
Jonathan Poulin
User avatar
HerbieH
Member
Member
Posts: 154
Joined: 2003-02-11, 10:04 UTC

Re: cm_ with parameters in main menu

Post by *HerbieH »

You are right in your last comment about making an em_ command.

Make the following entry in your default 'Wcmd_xxx.ini' file in your 'Language' folder):

Code: Select all

[em_Exit9]
cmd=cm_exit 9
menu=cm_exit 9
Change: 'MENUITEM "&Restart...", cm_Exit 9'

to:

Code: Select all

MENUITEM "&Restart...", em_Exit9
HerbieH*
-Keep on makin' music!
User avatar
petermad
Power Member
Power Member
Posts: 16009
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_ with parameters in main menu

Post by *petermad »

2jonathanpoulin

You have shown a lot of interest in TC menus and icon handeling lately - maybe you should try my Extended Menu (link in my signature). The Extended menu handles almost everything that you have addressed recently here on the forum. Hint - for getting icons for many of the extra items in the menu, you can run the Extended Menu item "Help" -> "Install Addons for Total Commander" - it will install alternative icon .dll and .inc files.

I don't say that you should use the Extended MEnu permanently, it is just for inspiration - and all you have to do not use the Extended Menu anymore, is to change the language in TC back to what it was via TC's configuration dialog.

You can also find link to the Extended Menus here: https://www.ghisler.com/languages.htm
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: cm_ with parameters in main menu

Post by *jonathanpoulin »

2HerbieH

Thanks for your reply. I have already done that and it's working perfectly.
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: cm_ with parameters in main menu

Post by *jonathanpoulin »

petermad wrote: 2024-07-14, 11:22 UTC 2jonathanpoulin

You have shown a lot of interest in TC menus and icon handeling lately - maybe you should try my Extended Menu (link in my signature). The Extended menu handles almost everything that you have addressed recently here on the forum. Hint - for getting icons for many of the extra items in the menu, you can run the Extended Menu item "Help" -> "Install Addons for Total Commander" - it will install alternative icon .dll and .inc files.

I don't say that you should use the Extended MEnu permanently, it is just for inspiration - and all you have to do not use the Extended Menu anymore, is to change the language in TC back to what it was via TC's configuration dialog.

You can also find link to the Extended Menus here: https://www.ghisler.com/languages.htm
Yes, I am really interested in getting TC menus and icons perfectly fit my needs. :wink:

I will take a look at your Extended Menu for sure, at least for inspiration like you said. :)

At the same time, I really like when I have total control on things, like customization. :lol:
Thanks,
Jonathan Poulin
Post Reply