Command browser "new command" max value of 1000

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Command browser "new command" max value of 1000

Post by *magz »

What I am addressing here is no major issue, it has just been bugging me for a while. And the reason it bugs me is due to my love for bloating up my TC installation with more portable software.
I love portable software, so I trie to make any software I like portable and part of my Total Commander installation, which also is portable and gets carried around on my USB pen, I'm using TC as my launch sentral for all my portable tools. So when we got the new command browser, enabling us to add commands to TC menu instead of the old TC start menu where there seemed to be a limit of 99 added items, I went a bit crazy adding tools. I even wrote my own simple autoit script which is converting any given total commander bar into a total commander menu, as well as user commands and my script will also convert the original toolbar into a toolbar where the new user commands is placed instead of the path to the application (and no parameters as they're now in the usercmd.ini), so I can easily drag and drop my applications to any toolbar, run my script and have the new tools available in TC menu as well as toolbars, yet being able to administer them in one place; the command browser.

So to cut to the case; my problems comes from having to many user commands, I'm at em_usercmd1154 atm. My above mentioned script will check for the highest em_usercmd number, and use the next nr in line and up, which all works the way I like it.
The feature no longer working when hitting over 1000 user commands is when I manually want to add commands in the command browser with the "new..." command feature. It will then default to em_usercmd1000 like shown in this screenshot: http://i.imgur.com/YeHxx.jpg

another issue in the Command browser when hoarding user commands like I do is the search filter is getting quite slow, especially since it seems to do a new search for every letter I type. The workaround is typing in notepad or any other location to copy & paste into the filter box, but that is a bit tedious.

so I guess what I want is the "new..." command feature to show the next em_usercmd# available also after hitting em_usercmd1000, and the search filter feature in the command browser to pause a little before searching (like halting the search if a new letter is typed within 1 second)

I realise that I could "fix" the "new..." command feature by having a search and replace tool renaming my em_usercmd's to em_anything's in usercmd.ini wincmd.ini, toolbars and menu.mnu file. I do like to stick to the standard em_usercmd naming though.

I'm sorry for asking about two things... to me they're both tightly related. And I'm aware that I have issues in keeping things short, sorry about that too. At least these are issues grounded in my love for Total Commander, my favorite program ever.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

so I guess what I want is the "new..." command feature to show the next em_usercmd# available also after hitting em_usercmd1000
Try Extended Command Editor, when you add a new command, it is take the highest available number.
The feature no longer working when hitting over 1000 user commands is when I manually want to add commands in the command browser with the "new..." command feature. It will then default to em_usercmd1000
TC accepts more than 4500 commands if you give each command a short name e.g. em_1, em_99, em_2000, etc...
When i was developing Extended Command Editor, i found that the buffer size for all command names in "Usercmd.ini" file is limited to about 32KB
em_nnnn is 7 characters long, 32000 / 7 = 4570
em_usercmdnnnn is 14 characters long, 32000 / 14 = 2285

To confirm, download this file, it is contain two "usercmd.ini" files, the both are the same but different in command names.
:arrow: If you used the "usercmd.ini" in the folder short_names, TC will read all the commands
:arrow: If you used the "usercmd.ini" in the folder standard_names, TC will read only the first 2258 commands

BTW: if you used the file "usercmd.ini" in the folder short_names and added new command, TC will suggest "em_usercmd1" :lol:
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Thank you very much for replying to my topic ts4242. I am familiar with your ultra TC pack and I like it. A neat pack it is, though I usually like to do my configuration through regular TC options or my scripts, so I tend to only use the History Editor.exe on occation to delete my TC history.
I checked out the Extended Commands Editor now, it has some neat features, but I feel it is missing several features before it would replace the TC Command Browser for me. I will trie to sum up what I feel is missing below, I apologise for being this picky:

I wish it was possible to set an option for the user command naming in Ultra TC Extended Commands Editor.
It seems to default to this naming type:
em_Extended_Command_#
it also seems to have issues on my system in finding the last used em_usercmd#,
when using the "add command" option in the Extended Commands Editor I get a command automatically added with this name:
em_Extended_Command_1400
But as my last used em_usercmd# is 1154 I'd expect it to name it em_Extended_Command_1155, or even better: em_usercmd1155

Only seems to be able to search through the usercmd names/numbers and path to software. What I use to do a search for in the Command Browser is the tooltip description. I also wish it would show the tooltip/descriptin in the Extended Commands Editor main view like the TC Command browser does. As I found myself randomly clicking my em_usercmd# commands to figure out which tool was what.

Seems double clicking any command in the Extended commands editor puts Total Commander as the front most window. A minor issue,
but I don't find that to be practical (especially since my current wireless mouse easily double clicks on random) so I wish there was an option to disable that feature.

I miss the option to make a copy of a specific command in Ultra TC Extended Commands Editor, I do that all the time in the TC Command Browser for adding new user commands based on existing, but with different parameters.
It would be particularily neat to have it automatically find the next available number then too. (the official Command Browser
will only do that for the "new..." command feature, so my technique for making a copy is usually pressing "new..." to see what command
is available or next in line, then canceling that, searching up the command to copy and rename the copy to the number i found to be available through the "new..." command. Although I now need to manually look that up as the "new..." command always shows em_usermd1000 like in the screenshot in my post above)

I'm slightly sceptical to why it needs to save the .ini for the menu, overwriting the old, even though it aint been changed.
I'm using Peter H. S. Madsen's extended menu, which comes with a menu.mnu file I edit to my liking, but I never alter the menu.ini file myself as I overwrite it with the new ini file when he makes updates and keep my own custom made commands in the usercmd.ini.
So I'd like it better if the Extended Commands Editor would ignore the menu.ini file, may also be practical as I am guessing the reason
for the high numbering of em_Extended_Command_# is due to the Extended Commands Editor adding the number of commands in usercmd.ini
to the number of commands in menu.ini +1?
If it only counted the commands of usercmd.ini that number would be about right, unless I'd deleted a couple of commands within the number range.

Thanks for the info about the limitation of a total size of 32kb for command names. I will keep that in mind and will rename from em_usercmd# to em_# when I run into problems due to this, do you know if the commands that are part of the menu.ini are added to this calculation, and also eating of the 32kb available? If so I'll be running into that problem sooner then expected.

I see the Start Menu Editor.exe in the Ultra TC pack will show the Extended Commands Editor, the start menu or the directory menu based on what was used at last run.
It would be great to be able to feed parameters to Start Menu Editor.exe overriding this, so I can make sure it shows the view I want at startup.
Alternatively I could of course make a simple script that altered the ultra tc editors.ini file before run changing ProgramMode=# where # = 1-3.

I like the feature of showing a question mark for invalid paths which your Extended Commands Editor does. However for commands residing in the windows paths, like in %WINDIR%\System32 it seems to get a bit confused, f.ex showing that red questing mark for the user commands using "CD" and "msconfig.exe" if the full path aint used to the windows command executable.

When altering the ultra tc editors.ini to change the install dir path to a portable path like this:
TCInstallDir=%COMMANDER_PATH%
At the next run ultra tc will overwrite that with my local installation path like this:
TCInstallDir=C:\totalcmd
But it does seem to work in portable mode and finds the TC path by itself, so that aint a big issue to me.

Tanks for making that pack of TC config tools for us ts4242.
Do with my Ultra TC Extended Commands Editor feature requests as you please. I hope I haven't ranted about features only usefull to myself here.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2magz
I wish it was possible to set an option for the user command naming in Ultra TC Extended Commands Editor.
It seems to default to this naming type:
em_Extended_Command_#
It is possible to change this as follow:
1- Open the language file "English.lng" or your own file.
2- Change the string 3173 to 3173=%i
3- Go to program options dialog> language tab and browse for the modified lng file

when using the "add command" option in the Extended Commands Editor I get a command automatically added with this name:
em_Extended_Command_1400
But as my last used em_usercmd# is 1154 I'd expect it to name it em_Extended_Command_1155, or even better: em_usercmd1155
That's because both commands in "usercmd.ini" and "wcmd_xxx.ini" are counted together. That's what TC do, so i follow its rule.

I'm slightly sceptical to why it needs to save the .ini for the menu, overwriting the old, even though it aint been changed.
You are right, I will consider to save only the file that has been changed.
do you know if the commands that are part of the menu.ini are added to this calculation, and also eating of the 32kb available?

According to my test, the answer is NO, each file has its own buffer.
It is easily to confirm by copying "usercmd.ini" to the folder contains your menu file and rename it to meet the name of the menu file, in this case TC will read all the commands in both files. (6616 commands if you used my test files. Is it possible to hit this number? :wink:).

It would be great to be able to feed parameters to Start Menu Editor.exe overriding this, so I can make sure it shows the view I want at startup.
Of course you can do by using the command line param /e, so to start Extended Command Editor, create a button bar and type /e in the parameter field. For more details please read the help file, Start Menu Editor> Hint and Tips topic

When altering the ultra tc editors.ini to change the install dir path to a portable path like this:
TCInstallDir=%COMMANDER_PATH%
At the next run ultra tc will overwrite that with my local installation path like this:
TCInstallDir=C:\totalcmd
TCInstallDir is used only when the program cannot find the environment variable %COMMANDER_PATH% e.g. if you start it from Explorer, therefor TCInstallDir always uses a real path.

I will consider your other notes.
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

ts4242 wrote: It is possible to change this as follow:
1- Open the language file "English.lng" or your own file.
2- Change the string 3173 to 3173=%i
3- Go to program options dialog> language tab and browse for the modified lng file
Thank you very much, I changed it to 3173=usercmd%i
ts4242 wrote: That's because both commands in "usercmd.ini" and "wcmd_xxx.ini" are counted together. That's what TC do, so i follow its rule.
To me it seems TC only cares about counting the commands named em_usercmd#
At least for the "new..." command function which is my worry.

I edited the usercmd.ini's you provided, to contain 20999 user commands with my edits (edits made where simple copy & paste and search & replace)

With the short names of em_# The "New..." command function in the command browser will suggest em_usercmd1, as you said in the first post, but I believe this is due to TC only counting the em_usercmd# commands:

Image: http://i.imgur.com/p1R26.jpg

If I go for the regular em_usercmd# naming with my 20999 commands in usercmd.ini, the TC Command Browser will display em_usercmd1000 for "new...", because it only cares about the range em_usercmd1-1000. In the below example I renamed the 20999 usercmd.ini files with short names (em_1 - em20999) to my menu.ini as well to give a total of 41998 commands, even when adding a new command to the menu.ini file with these short command names it will check through the usercmd1-1000 range for a free slot:

Image: http://i.imgur.com/1btxh.jpg

If I then delete a slot in the usercmd1-1000 range, TC will suggest I use that slot for a new command, thats why I like having my usercommands named em_usercmd#, for the belov example I decided to be all holy and delete the number of the beast command em_usercmd666 first to make that available:

Image: http://i.imgur.com/OvHnu.jpg
ts4242 wrote: According to my test, the answer is NO, each file has its own buffer.
It is easily to confirm by copying "usercmd.ini" to the folder contains your menu file and rename it to meet the name of the menu file, in this case TC will read all the commands in both files. (6616 commands if you used my test files. Is it possible to hit this number? :wink:).
Here em_4234 is max for short names, and em_usercmd2258 is max with the longer standard naming. And you are right it seems to be a seperate limit for each ini file.
It seems this is only a limitation in the command browser though regarding what it displays and are willing to add to the toolbar, I found this procedure to work for editing higher numbers, in the below example I will edit em_usercmd20995, because even though the command browser wont show these high em_usercmd# I just found that pressing new and changing the suggested em_usercmd1000 into em_usercmd20995 will not create a blank command but open the existing command still, picture of me happily editing:

Image: http://i.imgur.com/wfDva.jpg

when finished editing and pressing ok however, since the TC command browser doesn't list the newly edited em_usercmd20995 it set em_usercmd1 instead as the button bar command:

Image: http://i.imgur.com/rTVBX.jpg

But if I manually edit it, like below, then the toolbar button using em_usercmd20995 will actually work and load the tool CPUZ which is what I want:

Image: http://i.imgur.com/y3t21.jpg


I have a bug report for you ts4242!
I tried loading the 41998 user commands in the extended command browser. It will chop of the end of both the usercmd.ini file after saving, I added a new command first and got em_usercmd6481 suggested, and noted it looked strange, chopping off the last displayed command and also displaying slightly less commands in long name and short name format then what the TC command browser does:

long name:
Image: http://i.imgur.com/c3SHz.jpg

short names:
Image: http://i.imgur.com/IW2GZ.jpg

so in short names the extended command editor will display 4225 commands vs 4234 in the TC command browser.

and in long names the extended command editor will display 2255 vs 2258 in the TC command browser.

But only the extended command editor will chop off the end of the .ini files.

This is how my end of the test usercmd.ini looks after saving with the extended command editor:
Image: http://i.imgur.com/rKCJ3.jpg

and this is how my menu.ini looks, even though I didn't alter that:
Image: http://i.imgur.com/mjQjy.jpg

so in effect what happened is 90% of the commands where deleted from the end of the usercmd.ini (which has long names: em_usercmd#) and 75% of the commands where deleted from the menu.ini (which has short command names: em#)

here is a link to the edited test files:
http://www.mediafire.com/?8v0f90hb2a8v9h2

contains:
menu.ini (short command names em_#)
Usercmd.ini (longer standard command names em_usercmd#)
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

so in short names the extended command editor will display 4225 commands vs 4234 in the TC command browser.

and in long names the extended command editor will display 2255 vs 2258 in the TC command browser.
I'm also using a 32KB buffer size for command names, these slight differences due to TC's buffer is bigger than mine.

I have a bug report for you ts4242!
It is due to the 32KB buffer size, it will not occur in normal usage, you just found it under extreme usage. Anyway i will try to fix.
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

ts4242 wrote:It is due to the 32KB buffer size, it will not occur in normal usage, you just found it under extreme usage. Anyway i will try to fix.
Thanks a lot. Extreme usage is what this topic is all about I guess... I will stick to em_usercmd# as long as TC is counting those only for the "new..." command function (but please raise the number range checked from the low 1-1000 Mr. Ghisler), so my limit will be at 2255 user commands, a limit which I am positive I will have struggles with before 2 years have passed. So atm. no big rush with the 32kb limitation, but there must be equally crazy user command hoarders out there? Maby even worse? Don't leave me hanging as a crazy person here fellow user command hoarders. :shock:
Post Reply