Page 1 of 1

Command field size in buttons

Posted: 2014-04-12, 20:29 UTC
by HBB
Is it possible to increase the command field size?

Maximum command field size is currently limited to 259 characters and maximum parameters field size is limited to 2047 characters. Maximum command field size could be same with the parameters' one

I need it because only command field supports the environmental variables (I run some scripts with a lot of predefined environmental variables)

Best regards

Posted: 2014-04-12, 22:55 UTC
by petermad
You can use environment variables in the Parameters field by using double % notation:

%%TEMP%% in stead of %TEMP%

Posted: 2014-04-12, 23:19 UTC
by MVV
Only if application is able to expand envvars in parameters...

However such way may not work if button is started as administrator via its context menu: elevated process doesn't inherit TC environment. This may be tested using cmd.exe button with parameter /k "echo %%commander_ini%%".

Posted: 2014-05-04, 13:53 UTC
by HBB
To Author:

Any idea?

Posted: 2014-05-04, 18:44 UTC
by ZoSTeR
You can edit the .bar or usercmd.ini file directly without the 259 character limit.
There seems to be a limit at ~1000 characters.

Posted: 2014-05-04, 18:57 UTC
by MVV
ZoSTeR<
But what if you then change it from TC?

Posted: 2014-05-04, 19:01 UTC
by ZoSTeR
It's a workaround. The command is displayed in its entirety but you can't add more characters.

The limit should be raised since even cmd.exe can handle 8191 characters of arguments and the process limit seems to be 32767.

Posted: 2014-05-04, 23:50 UTC
by HBB
ZoSTeR wrote:...cmd.exe can handle 8191 characters of arguments and the process limit seems to be 32767
In fact, the "Open" box field in "Internal Associations" currently supports 1018 characters. The size seems enough, but, a standardisation for the sizes may be better.