Now the only way to reorganize and clean .bar-file structure is calling cm_ButtonConfig (or cm_ButtonConfig2) command and then pressing OK in "Change Button bar" window.
Suggestion - new command that can silently do it without any windows (for using in scripts, for example)
Command for reorganize/optimize .bar-file
Moderators: Hacker, petermad, Stefan2, white
Command for reorganize/optimize .bar-file
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Re: Command for reorganize/optimize .bar-file
Or maybe just a parameter for the current command: cm_ButtonConfig 1
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
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
Re: Command for reorganize/optimize .bar-file
I have a 3 lines main button bar with 150 buttons.
Just for interest, I haven't seen a reason to reorganize or optimize .bar files.
I always use the Button bar editor from the Ultra TC Editors.
Just for interest, I haven't seen a reason to reorganize or optimize .bar files.
I always use the Button bar editor from the Ultra TC Editors.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Command for reorganize/optimize .bar-file
2Horst.Epp
The need for reorganizing arises when you paste or delete buttons directly to the button bar via the bar's context menu. When doing that, the different parts of the button definition (buttonX, cmdX, paramX, pathX, iconicX, menuX) inside the bar file gets mixed up (button1 and iconic3 might come after each other). It is here that running cm_ButtonConfig and clicking OK fixes that, and rewrites the whole .bar file with item in "correct" order.
It is only a cosmetic thing inside the .bar file - it works just as well without reorganizing, but if you edit the bar file manually, it can be a nuisance if the items are out of order.
The need for reorganizing arises when you paste or delete buttons directly to the button bar via the bar's context menu. When doing that, the different parts of the button definition (buttonX, cmdX, paramX, pathX, iconicX, menuX) inside the bar file gets mixed up (button1 and iconic3 might come after each other). It is here that running cm_ButtonConfig and clicking OK fixes that, and rewrites the whole .bar file with item in "correct" order.
It is only a cosmetic thing inside the .bar file - it works just as well without reorganizing, but if you edit the bar file manually, it can be a nuisance if the items are out of order.
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
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
Re: Command for reorganize/optimize .bar-file
Parameter with bar name and path.petermad wrote: 2023-07-22, 07:30 UTC Or maybe just a parameter for the current command: cm_ButtonConfig 1
Or separate command like
optimizebar file_name
(similarly to openbar file_name)
I came across this situation when I was making scripts to dynamically change and combine button bars. And it's not only cosmetic in this case. It would be much easier if all the keys in the file were organized in order beforehand.petermad wrote: 2023-07-22, 10:24 UTC...when you paste or delete buttons directly to the button bar via the bar's context menu...
It is only a cosmetic thing inside the .bar file...
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway