Buttonbar - open folder with parameter support
Moderators: white, Hacker, petermad, Stefan2
-
- Junior Member
- Posts: 23
- Joined: 2017-07-10, 15:22 UTC
Buttonbar - open folder with parameter support
Hello,
I like to create a button on my button bar the supports parameters. Let me explain with an example.
I have the following UNC patch where <SERVER> need to be a variable that I can fill with the inputfield dialog created with the ?.
\\This_is_the_first_part_of_the_patch\<SERVER>\second_part.
The <SERVER> can be different and the rest is the same.
I like to create a button on my button bar the supports parameters. Let me explain with an example.
I have the following UNC patch where <SERVER> need to be a variable that I can fill with the inputfield dialog created with the ?.
\\This_is_the_first_part_of_the_patch\<SERVER>\second_part.
The <SERVER> can be different and the rest is the same.
-
- Junior Member
- Posts: 23
- Joined: 2017-07-10, 15:22 UTC
Hello,
Thank you for the reply, but I think I do not understand. Do I need the following?
Command: c:\Program Files\?
Parameter: ?
If I fill in a folder in the dialog, will it be placed in the command-line?
For example:
In the dialogbox I fill in: Internet Explorer, will the result in the command-line c:\Program Files\Internet Explorer\ ??
Thank you for the reply, but I think I do not understand. Do I need the following?
Command: c:\Program Files\?
Parameter: ?
If I fill in a folder in the dialog, will it be placed in the command-line?
For example:
In the dialogbox I fill in: Internet Explorer, will the result in the command-line c:\Program Files\Internet Explorer\ ??
so, i am here again
TC Button (how I understood your question)
Command : CD
Parameter: ?\\This_is_the_first_part_of_the_patch\<SERVER>\second_part.
Icon file : C:\Windows\System32\explorer.exe
Tooltip : Prompt for SERVER to switch to "second_part"
Press this button, you are prompted with the command, where you can modify the path.
In Button dialog, press F1 key to read more.
3. You can make a button to change directories, by specifying cd directory name as the command. ....
Example: cd \\server\share /user:username
Me think "AskParam" from user MVV could be a nice solution too.
Me think you can let AskParam ask for the <SERVER> and execute the modified command for you.
Unfortunately not much tested by myself
MVV, could you please once again explain how the AskParam command line should look like?
TC Button (how I understood your question)
Command : CD
Parameter: ?\\This_is_the_first_part_of_the_patch\<SERVER>\second_part.
Icon file : C:\Windows\System32\explorer.exe
Tooltip : Prompt for SERVER to switch to "second_part"
Press this button, you are prompted with the command, where you can modify the path.
In Button dialog, press F1 key to read more.
3. You can make a button to change directories, by specifying cd directory name as the command. ....
Example: cd \\server\share /user:username
Me think "AskParam" from user MVV could be a nice solution too.
Me think you can let AskParam ask for the <SERVER> and execute the modified command for you.
Unfortunately not much tested by myself
MVV, could you please once again explain how the AskParam command line should look like?
Last edited by Stefan2 on 2017-07-14, 12:26 UTC, edited 1 time in total.
-
- Junior Member
- Posts: 23
- Joined: 2017-07-10, 15:22 UTC
Uh, no I mean:
For example, I need to go to c:\Program Files\Internet Explorer\ but the part Internet Explorer must be imported using the inputfield dialog box. Thus, I click the TC button, the dialogbox appears, I enter Internet Explorer into the input field and this is added to the command-line CD c:\Program Files\ as CD c:\Program Files\Internet Explorer
Command: CD c:\Program Files\<this is from the dialog box input field>\
Parameter: ?
For example, I need to go to c:\Program Files\Internet Explorer\ but the part Internet Explorer must be imported using the inputfield dialog box. Thus, I click the TC button, the dialogbox appears, I enter Internet Explorer into the input field and this is added to the command-line CD c:\Program Files\ as CD c:\Program Files\Internet Explorer
Command: CD c:\Program Files\<this is from the dialog box input field>\
Parameter: ?
-
- Junior Member
- Posts: 23
- Joined: 2017-07-10, 15:22 UTC
- sqa_wizard
- Power Member
- Posts: 3864
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
The only way I'm aware is just:
This shows the complete path which you may edit then ...
Code: Select all
Command: cd
Parameter: ?c:\Program Files\
#5767 Personal license
Stefan2 wrote:There is something with %A...%A9 (Alias ?)
But I don't know how to use this
Me think something like this, but that don't work, says "Wrong drive" for me:
Command: CD c:\Program Files\A%
Parameter: ?
I will take a look,... never need this,.... probably others know that better then me.
AskParam is a nice solution you should give a look to it, to me this is the most flexible way to reach your needs.
%A ..... is used in user command parameter and have to be called from command line or windows message. Unfortunately, button bar does not allows to use ? or parameter for user command.
Simple AskParam solution:
You can make it more user friendly by adding more default servers to list and setting more descriptive label text.
Code: Select all
Program: AskParam.exe
Parameters: /t"default" /p"Select a server:" %%COMMANDER_EXE%% /O /S /L="\\This_is_the_first_part_of_the_path\%%1\second_part"