user comman d with %A not fully supported !

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

user comman d with %A not fully supported !

Post by *nsp »

I've made several user_command that have %A to allow adding info on each call.

if i use it from command bar it works OK but if i want to add the user command in a button, the parameter field is locked the %A is not usable anymore.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed the %A parameter is only for the command line. Please define a different command without %A for other locations.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

What about displaying a dialog that displays the command line (similar to ?). %A would be highlighted by default so the user can enter what ever he likes.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I have similar question - how I may pass parameters to user-command? What %-parameter should I specify in command's details to get command line passed to user-command? And, how can I call custom user-command with parameter e.g. from button bar? I tried some variants but no result (but some crash found instead:))...
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Lefteous wrote:What about displaying a dialog that displays the command line (similar to ?). %A would be highlighted by default so the user can enter what ever he likes.
The goal is to reuse the command from the command line to complete it and from a button adding the missing part.

I do not like to have tons of user command and no way to reuse them in other user command as reference ! (Editing in notepad++ usercmd.ini is for now my favorite way to manage user command )

M.Ghisler do not think that it is a bug that the parameter %A is only supported by command line..

I personally think that it could be better to support it also from button allowing to add parameter in the parameter and on the windows messaging system (i.e automation from powerpro or ahk or .....).
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2nsp
The goal is to reuse the command from the command line to complete it and from a button adding the missing part.
That's exactly why I made this suggestion.
I personally think that it could be better to support it also from button allowing to add parameter in the parameter and on the windows messaging system (i.e automation from powerpro or ahk or .....).
So what do you think is the best time to resolve the %A parameter?
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Lefteous wrote:So what do you think is the best time to resolve the %A parameter?
For command line and windows message with parameters (if supported) the %A is replaced at call time as it is natural way to do it.

For button, it could be fine to have parameter field ready for filling new "static parameters" that replace the %A and also the ? at the beginning if we want a popup !

Comment
I wanted to use it for testing purpose (switching one program by a newer/test version) i have made multiple commands as suggested by M. Ghisler and use an editor to do search and replace in the usercmd.ini...

I use it with subbar as menu, one with standard soft and the similar with test pgm. (i could have made the same editing/generating test_xx.bar)
Post Reply