Can Usercmd request fixed number?
Moderators: white, Hacker, petermad, Stefan2
Can Usercmd request fixed number?
the Usercmd like em_xxx put in menu get it code number when the TC startup, if I often trange the cmd, it will be very very troublesome
I hope I can request fixed number for my cmd like that
[em_xxx]
code=32
and the number begin from 20000, the em_xxx would get the code 20032 or any other way
I hope I can request fixed number for my cmd like that
[em_xxx]
code=32
and the number begin from 20000, the em_xxx would get the code 20032 or any other way
Code is required if you are mapping icons to external commandHorst.Epp wrote:There is no need for any number in em_ commands.
@thomasmo
Main Menu Editor has a feature to Customize TC's mapping file, it can auto update these codes for you.
Ultra TC Editors help wrote:(*) External commands takes high codes starting from 10,000 onward according to their order in the menu file, that's mean if their order changed while editing the menu file, they will lose their mapped icons because their code in the mapping file remains as before, and this will cause Total Commander maps their icons to different external commands.
(*) When saving the menu file, Main Menu Editor will update the mapping file if it detects difference between external command's new code and their previous code.
- thomasmolover
- Member
- Posts: 167
- Joined: 2016-12-12, 01:32 UTC
yes, it is my wish, thank you, but I think if it can be solve by TC selfts4242 wrote:Code is required if you are mapping icons to external commandHorst.Epp wrote:There is no need for any number in em_ commands.
@thomasmo
Main Menu Editor has a feature to Customize TC's mapping file, it can auto update these codes for you.
Ultra TC Editors help wrote:(*) External commands takes high codes starting from 10,000 onward according to their order in the menu file, that's mean if their order changed while editing the menu file, they will lose their mapped icons because their code in the mapping file remains as before, and this will cause Total Commander maps their icons to different external commands.
(*) When saving the menu file, Main Menu Editor will update the mapping file if it detects difference between external command's new code and their previous code.
I think an even better idea was if TC's Menu could use the value of the button= parameter from the [em_command] - that way we could also use other icons in the Menu than just those in the icon library.
It might need a cache file that corresponds to the used menu file (like wcmd_mymenu_eng.mn2 to wcmd_mymenu_eng.mnu) just like the button bar has its .br2 files - but honestly - if I delete my .br2 files and restart TC, I don't see much of a difference in the speed of loading button bars, even with many external icons, so maybe a cache for menu icons isn't necessary.
It might need a cache file that corresponds to the used menu file (like wcmd_mymenu_eng.mn2 to wcmd_mymenu_eng.mnu) just like the button bar has its .br2 files - but honestly - if I delete my .br2 files and restart TC, I don't see much of a difference in the speed of loading button bars, even with many external icons, so maybe a cache for menu icons isn't necessary.
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
Another idea is saving the external commands mapping in a new section where the command's name is used instead of the command's position, using the command's name guarantee the mapped icon will not change when the command's position change, it is also easier to work with command's name instead of command's code which is frequently change, e.g.
This is good for backward compatibility, if the section [em_mappings] exist then TC use its contents for mapping, otherwise use the section [mappings] as before.
Code: Select all
[mappings]
69=26
70=52
100=21
.
.
.
[em_mappings]
em_ext_calc=91
em_ext_mspaint=92
em_ext_notepad=93
.
.
.
- thomasmolover
- Member
- Posts: 167
- Joined: 2016-12-12, 01:32 UTC
ts4242 wrote:Another idea is saving the external commands mapping in a new section where the command's name is used instead of the command's position, using the command's name guarantee the mapped icon will not change when the command's position change, it is also easier to work with command's name instead of command's code which is frequently change, e.g.
This is good for backward compatibility, if the section [em_mappings] exist then TC use its contents for mapping, otherwise use the section [mappings] as before.Code: Select all
[mappings] 69=26 70=52 100=21 . . . [em_mappings] em_ext_calc=91 em_ext_mspaint=92 em_ext_notepad=93 . . .
this is very good idear,
Actually, the em_xx cmds already specify to the icon file, and the toolbar can displayit but the menu not. I only think it can
2ts4242
This is also a good idea - it doesn't give us external icons though.
This is also a good idea - it doesn't give us external icons though.
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