Page 1 of 1

increase char limit for toolbar parameters

Posted: 2011-09-05, 02:43 UTC
by chrizoo
.
suggestion: Please increase the character limit for toolbar parameters.

Currently* the maximum limit for toolbar parameters is 259 characters.

This INCLUDES expanded variables, which means that if one variable expands to a path with 159 characters, you only have 100 characters left for the remainder of the parameter !!

That's clearly not enough.

The OS limit for Windows XP is 8191 characters, so that shouldn't be the problem.
http://support.microsoft.com/kb/830473 wrote:On computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters."
* I don't have the latest TC version, can someone please check if the limit has maybe been increased already? Thank you.

Posted: 2011-09-05, 06:38 UTC
by MVV
You're wrong. This includes only string length in INI. Expanded string may have much larger length.
TOTALCMD.chm wrote:%S insert the names of all selected files into the command line. Names containing spaces will be surrounded by double quotes. Please note the maximum command line length of 32767 characters.
I've written simple test application that shows length of command line, it shows length 30496 for all files in my Windows\System32 folder using %S.

Posted: 2011-09-05, 13:24 UTC
by ghisler(Author)
Indeed 32767 characters is a system limit when using CreateProcess. With the otherwise used ShellExecuteEx, the limit is even smaller (different depending on the Windows version).

Posted: 2011-09-05, 14:03 UTC
by chrizoo
@ Mr. Ghisler: thank you for commenting. I'm working on TC 6.51. Was the character limit changed from 259 somewhere after that version?
MVV wrote:You're wrong.

@MVV: No I'm not wrong. I'm just describing what my TC does and I'm the only one in a position to verify this. Please read last line of OP.

The "modify toolbar button" pop-up window has a 259 char limit for the "parameter field". It just won't accept a 260th one. The text field is full.

When using ? as the first character of the parameter, TC displays the command in a pop-up window before executing it. In this pop-up window the char limit is ALSO 259. When variables are expanded, the remainder of the command exceeding 259 characters is just cut off.

Posted: 2011-09-05, 15:15 UTC
by MVV
chrizoo, please read subforum name: TC7.56a suggestions (English). TC 7.56a supports larger command line length. You may write up to 260 characters into parameter field - yes, but this length doesn't include expanded variables, it includes only their definitions.

If I use ?%S parameter, pop-up window appears, I see that it contain something but I can't see text (every character looks like space), but when I copy all text (Home, Shift+End, Ctrl+C) and paste into an editor, I get full text (all 30k+ characters). I can see text in pop-up window only if its length is less than about 6800 characters.

Posted: 2011-09-05, 15:23 UTC
by chrizoo
MVV wrote:chrizoo, please read subforum name: TC7.56a suggestions (English).
HENCE the last line of my OP!
so why am I wrong?

I NEVER said you are! Can we please stop the off-topic part of the discussion.
TC 7.56a supports larger command line length. You may write up to 260 characters into parameter field
ok, then my suggestion is - still - to increase that amount, because it is really incredibly low (when you consider e.g. the param length of FFmpeg and the like ...)

Posted: 2011-09-05, 15:30 UTC
by MVV
If I say "you are wrong" but you say that you're not wrong, so I am wrong. Simple logic. :)

BTW, there is another subforum Total Commander (English) for questions. Current subforum is for suggestions only, for last TC version. :wink:

About length of parameter string - AFAIK it was discussed many times.

Posted: 2011-09-05, 15:33 UTC
by chrizoo
MVV wrote:If I say "you are wrong" but you say that you're not wrong, so I am wrong. Simple logic. :)
no, it's possible that nobody is wrong. both can be right.
It's better not to assume somebody meant something he never said! Just stick to what he actually said. That avoids misinterpretations.
ONE MORE TIME: Can we please stop the off-topic part of the discussion now. thank you.
BTW, there is another subforum Total Commander (English) for questions. Current subforum is for suggestions only. :wink:
this is a RFE/suggestion, not a question.

Re: increase char limit for toolbar parameters

Posted: 2011-09-05, 19:53 UTC
by HolgerK
<OT>
chrizoo wrote:I'm working on TC 6.51.
Any specific reason for that? :shock:
Maybe the release date (02.02.05)? :)
This INCLUDES expanded variables, which means that if one variable expands to a path with 159 characters, you only have 100 characters left for the remainder of the parameter !!
At least 50% of your request seems to be fulfilled with 7.56a.
Do you consider to update your TC?
You know "As soon as you are registered, (until further notice) all updates are free"...
</OT>
Was the character limit changed from 259 somewhere after that version?
History.txt wrote: 14.02.07 Release Total Commander 7.0 private beta 3.7
...
13.02.07 Added: Button bar, start menu: New parameters %S and %s now support a maximum command line length of 32kBytes, by using CreateProcess instead of ShellExecuteEx. Only use these parameters with EXE files.
HTH
Holger

Posted: 2011-09-08, 09:59 UTC
by ghisler(Author)
Also the parameters field in the button bar supports up to 2048 characters now.

Re: increase char limit for toolbar parameters

Posted: 2011-09-08, 10:26 UTC
by chrizoo
ghisler(Author) wrote:Also the parameters field in the button bar supports up to 2048 characters now.
excellent.

Would you maybe be willing to consider increasing this to 8191 so that the full length allowed by XP can be used?
http://support.microsoft.com/kb/830473 wrote:On computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters."
(In case TC still supports pre-XP Windows versions, TC could adjust the limit if need be on these installations).

Posted: 2011-09-08, 22:47 UTC
by HolgerK
ghisler(Author) wrote:Also the parameters field in the button bar supports up to 2048 characters now.
Did I miss a TC-update (running TC7.56a here)?
The edit field "Parameters:" (from the change button dialog) only allows to enter 259 characters.
chrizoo wrote:Would you maybe be willing to consider increasing this to 8191
chrizoo wrote:(when you consider e.g. the param length of FFmpeg and the like ...)
FFmpeg Documentation::3.10 Preset files wrote:A preset file contains a sequence of option=value pairs, one for each line, specifying a sequence of options which would be awkward to specify on the command line. Lines starting with the hash ('#') character are ignored and are used to provide comments. Check the `ffpresets' directory in the FFmpeg source tree for examples.
I totally agree: It's awkward to edit such a long parameter line with an edit field that only show 50 characters of the whole line.
But it may be useful in some cases to paste more than 259 characters in the parameter field.

Regards
Holger

Posted: 2011-09-09, 00:27 UTC
by chrizoo
^
FFmpeg was just an EXAMPLE, there are heaps of command line programs which don't offer that luxe.

PLUS, I prefer to have the parameters directly in TotalCommander!

@HolgerK: as a side-note, your TC updating questions made me start a dedicated thread, check it out :)
HolgerK wrote: I totally agree: It's awkward to edit such a long parameter line with an edit field that only show 50 characters of the whole line.
But it may be useful in some cases to paste more than 259 characters in the parameter field.
:idea: good call, that just made me think it would be great to show more than 50 chars at a time, because that really makes it difficult to edit. Or maybe add a button "open in editor". Or do you have any other idea?

Posted: 2011-09-09, 01:13 UTC
by HolgerK
chrizoo wrote:Or do you have any other idea?
A horizontal re-sizable "Change (single) button (bar)" dialog would be fine.

Regards
Holger

Posted: 2011-09-09, 01:24 UTC
by chrizoo
HolgerK wrote:A horizontal re-sizable "Change (single) button (bar)" dialog would be fine.
I missed the obvious. Yes, that would be fine. Support++. Good idea.