Command field size in buttons

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Command field size in buttons

Post 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
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

You can use environment variables in the Parameters field by using double % notation:

%%TEMP%% in stead of %TEMP%
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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%%".
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

To Author:

Any idea?
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post 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.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ZoSTeR<
But what if you then change it from TC?
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post 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.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post 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.
Post Reply