Tips for buttons. Where are they?
Moderators: white, Hacker, petermad, Stefan2
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
Tips for buttons. Where are they?
1. Open totalcmd.inc for editing
2. At the end fill in two strings like these:
[mycommands]=0
regedit.exe=9998;this is a tip
3. Now create a button for this command.
4. See what tip does TC show to you? I see "regedit.exe" (without quotes) instead of "this is a tip".
TC 6.54a. Can anyone confirm?
BTW, nice day today - three successful bugreports, and all unanswered by Ghisler
2. At the end fill in two strings like these:
[mycommands]=0
regedit.exe=9998;this is a tip
3. Now create a button for this command.
4. See what tip does TC show to you? I see "regedit.exe" (without quotes) instead of "this is a tip".
TC 6.54a. Can anyone confirm?
BTW, nice day today - three successful bugreports, and all unanswered by Ghisler
Last edited by XPEHOPE3KA on 2006-04-27, 16:45 UTC, edited 2 times in total.
TC gets the string for the tips from the .mnu file - not from the .inc file - so since the command is not in the menu, you get no tip.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
This violates the rules for the internal commands.[mycommands]=0
regedit.exe=9998;this is a tip
use instead cm_regedit.exe=9998;
and add (as petermad statet) a menuitem in you menufile
MENUITEM "This is a cool Tooltip", 9998
Then select in your button the new "cm_regedit.exe" entry and you will find that the tooltip is "This is a cool Tooltip"(unless your totalcmd.inc exceeds 500 lines and this cm_regedit.exe is beyond this 500 - but this is anohter item).
BTW, nice day today - three successful bugreports, and all unanswered by Ghisler Smile
Oh you should give him at least time to read them, shouldn't you?
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
Why do you think I was speaking about a menu command? I was speaking about a button using a new command.
Follow steps exactly as I stated - you shouldn't add anything neither to wincmd.ini nor to xxx.mnu, but the command (which runs regedit!) will work.
BTW, I also couldn't assign a hotkey to such a command. Imagine I could - there would be no need to change the start menu anymore for adding a hotkey to a new command!
2Sheepdog
Follow steps exactly as I stated - you shouldn't add anything neither to wincmd.ini nor to xxx.mnu, but the command (which runs regedit!) will work.
BTW, I also couldn't assign a hotkey to such a command. Imagine I could - there would be no need to change the start menu anymore for adding a hotkey to a new command!
2Sheepdog
Where do I read them?This violates the rules for the internal commands.
Well, what I told was a joke.Oh you should give him at least time to read them, shouldn't you?
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
Re: [BUG] In totalcmd.inc
We can hope that he is busy completing TC 7!XPEHOPE3KA wrote:BTW, nice day today - three successful bugreports, and all unanswered by Ghisler
Keep the compiler running, Christian!
//Peter
It works not because your entry "regedit.exe" became one of TC internal commands but because regedit.exe is in your windows folder so you don't have to write the full path, just file name only will work!XPEHOPE3KA wrote:Follow steps exactly as I stated - you shouldn't add anything neither to wincmd.ini nor to xxx.mnu, but the command (which runs regedit!) will work.
TC help> 4. Configuration and switches> c. Change main menu> Identifier topicXPEHOPE3KA wrote:Where do I read them?
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
Actually, I know that. The questions are:It works not because your entry "regedit.exe" became one of TC internal commands but because regedit.exe is in your windows folder so you don't have to write the full path, just file name only will work!
1. Why does TC not show me the tip?
2. Why can't I assign a hotkey? It looks so simple...
3. Well, TC doesn't create a special command for my entry as its number is 9998 - doesn't reside in start menu. So if I add a button with a number 9998 (not getting the comand from the combobox), then (after pushing the button) TC says that the function is not implemented. But if I add a button with a number like 750 (I don't have a corresponding entry in my start menu), then the active panel blinks once and no message appear.
It looks like there are already 198 commands for 701...898 (or something) organized in a list or an array. Then the question is: why not to allow using such easy commands: write any command you want in totalcmd.inc, assign it to some number, then assign a hotkey for that command - see, no start menu entries needed.
Some of these steps actually work now: you can write anything as a command and assign it to any number, and then use it in some button. But you can't see the tip and you can't assighn a hotkey.
I guess TC does it like this:
1. When you create a button and use the combobox to insert a command, then the command from totalcmd.inc goes to your BAR file directly (without processing if it is a valid command);
2. But when you hover the button TC looks at the command:
if it starts with "cm_", then it looks for it in totalcmd.inc for its tip;
if it doesn't then the command itself is displayed
3. When you press the button TC looks at the command again:
if it starts with "cm_", then it looks for it in totalcmd.inc for its number and then invoke the corresponding command;
if it doesn't look like internal command, then TC sends the command itself (with necessary parameters handling) for execution. That's why simple adding of commands to totalcmd.inc works with buttons.
NO, No, no - it looks in your .mnu file and uses the text correlated with the cm_ command as the tip - I already wrote that here: http://ghisler.ch/board/viewtopic.php?p=86052&sid=8015288ce5347afde6e4af8187e8e78f#860522. But when you hover the button TC looks at the command:
if it starts with "cm_", then it looks for it in totalcmd.inc for its tip;
It is silly - it would make much more sence to take the description from totalcmd.inc - but that's not how it is!
Last edited by petermad on 2006-04-22, 21:21 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
What .mnu file are you speaking about??? In my WCMD_RUS.MNU I have no tips! That should be nothing common between the menu and the buttonbar. Maybe, you meant .bar instead of .mnu? If you did than I will say that's not true also, because I have only these strings in my default.bar:
button6=WCMICONS.DLL,10
cmd6=cm_MultiRenameFiles
But TC shows me my russian tip from totalcmd.inc.
When you add a button for a new command TC gets the tip from totalcmd.inc file and then stores it in the .bar file.
The method TC uses for getting the tip from totalcmd.inc as I see it is described above.
button6=WCMICONS.DLL,10
cmd6=cm_MultiRenameFiles
But TC shows me my russian tip from totalcmd.inc.
When you add a button for a new command TC gets the tip from totalcmd.inc file and then stores it in the .bar file.
The method TC uses for getting the tip from totalcmd.inc as I see it is described above.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
2XPEHOPE3KA
Try this:
1. Edit the the text between "" in the first MENUITEM in your WCMD_RUS.MNU to something distinguishable - for example "Mickey Mouse".
2. Make a button in the button bar for the corresponding command (cm_Attrib - if it is the standard WCMD_RUS.MNU file).
3. Hover over the button - the tooltip shows "Mickey Mouse".
Get it now?
The caption of the menu item is used as the tip!What .mnu file are you speaking about??? In my WCMD_RUS.MNU I have no tips!
Try this:
1. Edit the the text between "" in the first MENUITEM in your WCMD_RUS.MNU to something distinguishable - for example "Mickey Mouse".
2. Make a button in the button bar for the corresponding command (cm_Attrib - if it is the standard WCMD_RUS.MNU file).
3. Hover over the button - the tooltip shows "Mickey Mouse".
Get it now?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
The menu caption is used as tool tip for a button bar if this button command is exist in your main menu, but the tip in .bar file has high priority, so to see the tips from your main menu delete the button tip from your .barXPEHOPE3KA wrote:What .mnu file are you speaking about??? In my WCMD_RUS.MNU I have no tips!
2XPEHOPE3KA
NO look at the line "Tooltip" in the "Change button bar" dialog - nothing is put in there automatically when you choose an internal command for a button. And unless you enter a tooltip manually, there will be NO tooltip in the .bar file for internal commands.TC gets the tip from totalcmd.inc file and then stores it in the .bar file.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
ABSOLUTELY !
2petermad
Hello Peter !
- Absolutely ! If I forget to type an info text for a new button using an internal command, I get nothing !
• This is the behaviour for ages, and it's still the same !
FR
Claude
Clo
Hello Peter !
- Absolutely ! If I forget to type an info text for a new button using an internal command, I get nothing !
• This is the behaviour for ages, and it's still the same !
FR
Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
Strange & complicated way, but I got it and I agree it can be useful.petermad wrote:Get it now?
Now I see that totalcmd.inc has nothing with tips, and I agree that what we have nowadays is silly.It is silly - it would make much more sence to take the description from totalcmd.inc - but that's not how it is!
Actually, I was fooled by the fact that totalcmd.inc entries and wcmd_rus.mnu entries are almost the same - so I didn't distinguish what was responsible for tips. But now I wonder what are the comments in totalcmd.inc for?
I guess what we are speaking about has some relationship with unified command system, has it? (too lazy to read all that never-will-be-implemented stuff)
They are currently only explaining the command if you choose it from the dropdown list inXPEHOPE3KA wrote: But now I wonder what are the comments in totalcmd.inc for?
Create a button
Create a Startmenu entry
Redefine hotkeys (Keyboard remapping)
Did I miss one?
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams