MVV wrote:AmandaPratt126,
Thank you!
Sorry, there is no complex documentation with tutorials. I've tried to add a Readme but it is very poor yet. However I think you can read entire topic in order to get more examples.
Of course, feel free to ask if you need something special. You only need to provide desired scenario.
AskParam: Asks for command-line parameters via GUI dialog
Moderators: Hacker, petermad, Stefan2, white
Sorry, just read your this reply after I posted my message over. I will check this whole thread later.
Well, you're right, Readme is needed and it is partially written but not finished yet.

I think it is enough to list most popular modes.8 modes of show mode only list out 4 of them.
Try it again;) second one doesn't allow editing of answers.Tried but don't know the difference of /rd and /rl.
Just press Ctrl+C and Windows will do the rest.The only one example is in help dialog window, but this example cannot be copied

You should start cmd.exe or AskParam from TC, not from Explorer (Start menu) to inherit TC variables.Seems because you added %COMMANDER_PATH% to system environment variables, so you can get the right result?
Jus tried it (1.0.6.136) with different values, all seems to be OK. Please try this one.For the parameter /v, when the dialog width is not default, it is not in the middle of screen, I think centering this dialog should be better.
I think something like this should work (from usercommand or buttonbar button):And, I wanna use AskParam.exe to implement the function
Code: Select all
AskParam.exe /t"%N" /p"Rename file:" cmd.exe /c "ren %P%N "%%1""
Your reply is so quick.

=====
=====
According to your help dialog's parameter's sequence, I put /v after all other parameters, I cannot get final effect after many tries, it confused me for long time until i put /v at the beginning, so

Yes, tested and Ctrl+C works, but, these people who are using askparam and don't know to ask help in this forum, may miss this powerful and secret skill.Just press Ctrl+C and Windows will do the rest.

Tried below 2, both TTT are editable:Try it again;) second one doesn't allow editing of answers.
/tTTT /p /rd
/tTTT /p /rl
=====
All the tests are under this situation: drag AskParam.exe to buttonbar, fill parameters into TC's parameters text line, then Ok and Click to Run.You should start cmd.exe or AskParam from TC, not from Explorer (Start menu) to inherit TC variables.
Yes, the dialog is in the center of the screen now, but still has a problem, when the width is too big, the dialog appears in weird place again.Jus tried it (1.0.6.136) with different values, all seems to be OK. Please try this one.
=====
According to your help dialog's parameter's sequence, I put /v after all other parameters, I cannot get final effect after many tries, it confused me for long time until i put /v at the beginning, so
the same problem also exist here:/v800:400 /p ===>effect ok.
/p /v800:400 ===>nothing happened.
And, you should tell users that parameter /p is minimal needed parameter(s), otherwise I have to test and test and test again to find what on earth happened./tTTT /pPPP ===>effect ok.
/pPPP /tTTT ===>TTT disappeared
Seems only works sometimes, and, especially when SPACE exists inside filename, it will give an error message. I need to try more.AskParam.exe /t"%N" /p"Rename file:" cmd.exe /c "ren %P%N "%%1""

No, you must prepare to next question before you ask it, and every /p asks a question. So you have to change combobox mode before /p.Tried below 2, both TTT are editable:
until i put /v at the beginning, so
Yes, same thing: all preparations before asking a question.the same problem also exist here:
Ah, got it. You miss the fact that TC can't expand envvars in buttonbar's parameters field, so it cuts all percent sequences. You should twice percent characters in that field (topic contains examples for that place too).All the tests are under this situation: drag AskParam.exe to buttonbar, fill parameters into TC's parameters text line, then Ok and Click to Run.
Please describe with more details.And, you should tell users that parameter /p is minimal needed parameter(s), otherwise I have to test and test and test again to find what on earth happened.
You should play with percent sequences, also keep in mind that names with spaces must be quoted. You can check command line in CMD.exe process details (in Process Explorer or Process Hacker).Seems only works sometimes, and, especially when SPACE exists inside filename, it will give an error message.
Small issue with redirection of askParam command
I have a console proggy that output the result in stdout and error in stderr which i commonly redirect to file using 1> 2> and 1>> and 2>> i would like to call it using
A) do you have an option to show a kind of file chooser ?
B) do you have specific code to replace redirection ?
C) does it exist a way to have askParam taking parameters from a file ?
Code: Select all
askparam /w /C"My Proggy" /P"Input Scheme" /p"Output File" /p"Otput errLog" myProggy %1 [b]> %2 2>%3[/b]
B) do you have specific code to replace redirection ?
C) does it exist a way to have askParam taking parameters from a file ?
A. File open dialogs are not supported by AskParam. You can only type paths to editbox. And redirection to such file may work if you escape redirect characters to allow them to be passed to AskParam and not processed by the caller (AskParam doesn't process them):
B. What kind of replacing do you mean? AskParam doesn't process redirection characters at all.
C. Are you talking about auto-answering from file? However AskParam can't read anything from files anyway. If you need both using AskParam and answers file, perhaps you should consider writing a batch that will be started using both ways.
Code: Select all
AskParam.exe /pFile cmd "/c echo wow > %1"
C. Are you talking about auto-answering from file? However AskParam can't read anything from files anyway. If you need both using AskParam and answers file, perhaps you should consider writing a batch that will be started using both ways.
Thanks a lot for your hint qbout quotting i did not even triedMVV wrote:A. File open dialogs are not supported by AskParam. You can only type paths to editbox. And redirection to such file may work if you escape redirect characters to allow them to be passed to AskParam and not processed by the caller (AskParam doesn't process them):B. What kind of replacing do you mean? AskParam doesn't process redirection characters at all.Code: Select all
AskParam.exe /pFile cmd "/c echo wow > %1"
C. Are you talking about auto-answering from file? However AskParam can't read anything from files anyway. If you need both using AskParam and answers file, perhaps you should consider writing a batch that will be started using both ways.

(C) For parameter file, instead of reading parameter from command line why not having a file from where you read askparam setrting Ex
Code: Select all
/s3
/c My caption
/t C:\
/t D:\,/u
/p Param 01
/p Param 02
Exec "%1" %2 >%TEMP%\outFile.txt ¬epad %TEMP%\outFile.tx
Thanks for your explanation, now I finally understand the sequence logic, and, your so much explanation shows that a readme file is necessary indeed.Yes, same thing: all preparations before asking a question.

I have many long filename's files because I need to put notes/memos into filename for easy searching, I decided to go back to use F6 to rename single file even the F6 function is also a little inconvenient. There are 1 or 2 Single File Renaming Dialog in TC, but seems no call entrance for them. Thanks again.You should play with percent sequences, also keep in mind that names with spaces must be quoted. You can check command line in CMD.exe
Adjust names of generated environment variables.
Hello MMV,
I would like to set the names for the generated environment variables (AskParam1,...). You could reuse the /e flag.
Example: AskParam /t"Option1" /p"any Option" /e"my_opt" ...
creates the environment variable: my_opt=Option1
I think this would make /e- flag obsolete.
What do you think ?
I would like to set the names for the generated environment variables (AskParam1,...). You could reuse the /e flag.
Example: AskParam /t"Option1" /p"any Option" /e"my_opt" ...
creates the environment variable: my_opt=Option1
I think this would make /e- flag obsolete.
What do you think ?
You can try test version, I've added it like hints in /t but into /p.
AskParam beta 144
Usage example:
It will put answer into my_opt variable instead of AskParam1.
AskParam beta 144
Usage example:
Code: Select all
AskParam /t"Option1" /p(e)"my_opt: any Option" ...
Thank you!
Thanks a lot ! 
It works as expected.

It works as expected.

Can't remember when it was broken but I've fixed it: ^n is replaced with line break in /p prompts allowing multiline questions.
AskParam beta 146
AskParam beta 146