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 comman d with %A not fully supported !
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
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:))...
The goal is to reuse the command from the command line to complete it and from a button adding the missing part.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.
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 .....).
2nsp
That's exactly why I made this suggestion.The goal is to reuse the command from the command line to complete it and from a button adding the missing part.
So what do you think is the best time to resolve the %A parameter?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 .....).
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.Lefteous wrote:So what do you think is the best time to resolve the %A parameter?
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)