[Fixed] %A parameter not documented in help file

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

[Fixed] %A parameter not documented in help file

Post by *icfu »

29.08.06 Added: Alias commands on the command line support a command placeholder %A in the command definition, e.g. %A %N will be replaced by the parameter typed by the user, followed by the current file name under the cursor
That's a too important feature for burying it in history.txt...

Icfu
Last edited by icfu on 2008-04-24, 17:18 UTC, edited 2 times in total.
This account is for sale
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

WOW, thanks Icfu!! This way there is some automatization possible from the comand line I guess. I must play with this.
I switched to Linux, bye and thanks for all the fish!
User avatar
now
Member
Member
Posts: 181
Joined: 2006-11-01, 08:34 UTC

Post by *now »

Sweet! I was looking for such an expando, but couldn’t find one. This will make it possible to consolidate quite a few of my aliases.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Added Tutos

Post by *Clo »

2icfu


:) Hello Jeff !

• Added in the Tutos @ download, online very soon ;)

APART :   AFAIK, the line in the History.txt might be :
…%A %N will be replaced with the parameter…
:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Yuta
Member
Member
Posts: 145
Joined: 2007-03-27, 16:52 UTC
Location: Argentina

Post by *Yuta »

Can someone give a larger explanation?.
I put the commands %A %N assigned at a button but it didn't work.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

If you want to enter a parameter after pressing a standard button, you have to use ?, not %A!

%A is used for custom commands and replaced by the parameter you enter on the command line. See this thread as an example what you can do with %A:
http://www.ghisler.ch/board/viewtopic.php?p=127707#127707

Icfu
This account is for sale
User avatar
Yuta
Member
Member
Posts: 145
Joined: 2007-03-27, 16:52 UTC
Location: Argentina

Post by *Yuta »

Oh!. I see. I wasn't aware of the existence of custom commands. Thanks for the link.
User avatar
Hacker
Moderator
Moderator
Posts: 13141
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

BTW: This is how I had hoped Aliases and %A would work - see sample application. Just try to type these into the command line:

Code: Select all

z BlaBla

Code: Select all

z> BlaBla
The ">" overwrites the sample parameter definition.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Well, this problem can be solved manually just by duplicating the z alias, naming it z> and removing all but %A from parameter.

But, the alias feature of TypeAndRun is not possible in TC, which is what I miss:

alias z
command: bla.exe
parameter: /fixed1 %A1 /fixed2 %A2

So, you enter z bla blubb and the result is:
bla.exe fixed1 bla fixed2 blubb

Icfu
This account is for sale
User avatar
Hacker
Moderator
Moderator
Posts: 13141
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

icfu,
Well, this problem can be solved manually just by duplicating the z alias, naming it z> and removing all but %A from parameter.
:lol: :lol: :lol:

This is the first time you responded the same way as Christian did (on the beta board). :)

The difference is that you are suggesting a workaround, I was suggesting a way how to implement a new feature at that time.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

This is the first time you responded the same way as Christian did (on the beta board).
What a fuckin' great compliment! :mrgreen:
The difference is that you are suggesting a workaround, I was suggesting a way how to implement a new feature at that time.
True, and I am absolutely in favour of your proposal as I hate workarounds. Nothing more stupid than to create every alias twice... I only wanted to join the party of frustration with an example which doesn't even have a workaround. ;)

Well, I would probably choose another symbol, not >, because this looks like a redirection to me, but that's not really important.

Too bad that ghisler hasn't listened.

Icfu
This account is for sale
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

%A has been documented now. In addition, there are new parameters %A1..%A9 for parameters 1..9! Please try it.
Author of Total Commander
https://www.ghisler.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Confirmed documentation. %A additions are very nice, good job.

Icfu
This account is for sale
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks! :)
Author of Total Commander
https://www.ghisler.com
Post Reply