systemvariables as parameter in buttonbar bug
Moderators: Hacker, petermad, Stefan2, white
systemvariables as parameter in buttonbar bug
If I make a Button and want to pass a parameter as systemvariable e.g. %commander_path% or %windir% and place it in the parameter field TC passes instead "%Commander_path%" "'ommanderpath" and removes the following backslash.
sheepdog
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
As far as I know the parameter field is thought for internal variables only. It will work fine for other command line parameters as long as you don't try to use the percent character. TC will always try to expand these internal parameters. I always set command line parameters in the command field if possible.
[face=courier]On 14-10-2004 01:34:35 +0000 Lefteous wrote:
L> As far as I know the parameter field is thought for
L> internal variables only. It will work fine for other
L> command line parameters as long as you don't try to
L> use the percent character. TC will always try to expand
L> these internal parameters.
OMG...
%%TEMP%%
That's basic thing from help:
_________transmission_from_TOTALCMD.HLP___________
%% inserts the percent-sign.
_______________end_of_transmission________________[/face]
L> As far as I know the parameter field is thought for
L> internal variables only. It will work fine for other
L> command line parameters as long as you don't try to
L> use the percent character. TC will always try to expand
L> these internal parameters.
OMG...
%%TEMP%%
That's basic thing from help:
_________transmission_from_TOTALCMD.HLP___________
%% inserts the percent-sign.
_______________end_of_transmission________________[/face]
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]
I made a button with:
and Textpad still does not find the file. If I use:
It works perfectly fine.
sheepdog
Code: Select all
Commandline: Textpad.exe
parameter: %%Commander_path%%\ini\%%username%%\wincmd.ini
Code: Select all
Commandline: Textpad.exe %Commander_path%\ini\%username%\wincmd.ini
parameter:
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Another workaround for this different behavior of environment variables
This is useful if you need additional parameters like %N, %M, %O, %E.
2Christian Ghisler
In "Command": environment variable will be replaced with the proper content of this variable;
in "Parameters": no replacement of environment variables will be realized (except the replacements by TC like double %% to single %, %N ...)
What are the reasons for this different behavior of environment variables in "Command" and "Parameters"?
Code: Select all
Command: %comspec%
Parameters: /c @start notepad %%Commander_path%%\DEFAULT.BAR

2Christian Ghisler
In "Command": environment variable will be replaced with the proper content of this variable;
in "Parameters": no replacement of environment variables will be realized (except the replacements by TC like double %% to single %, %N ...)

The doorstep to the temple of wisdom is a knowledge of our own ignorance. Benjamin Franklin
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The problem is that the parameters field uses special variables like %P or %N which are incompatible with environment variables...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
[face=courier]On 14-10-2004 13:42:45 +0000 nevidimka wrote:
n> Another workaround for this different behavior of environment
n> variables
Yep, that's exactly how I managed to use it - via cmd /c start. And that's a good idea to check "Run mi&nimized" in such a case.[/face]
n> Another workaround for this different behavior of environment
n> variables
Yep, that's exactly how I managed to use it - via cmd /c start. And that's a good idea to check "Run mi&nimized" in such a case.[/face]
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]