Buttonbar - open folder with parameter support

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
DaPaleRider
Junior Member
Junior Member
Posts: 23
Joined: 2017-07-10, 15:22 UTC

Buttonbar - open folder with parameter support

Post by *DaPaleRider »

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.
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Hi,
add a "?"-sign at pos. 1 at the parameter box
to be prompted on button click.



more later, if need.



 
DaPaleRider
Junior Member
Junior Member
Posts: 23
Joined: 2017-07-10, 15:22 UTC

Post by *DaPaleRider »

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\ ??
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

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 :cry:

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.
DaPaleRider
Junior Member
Junior Member
Posts: 23
Joined: 2017-07-10, 15:22 UTC

Post by *DaPaleRider »

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: ?
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

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.




 
DaPaleRider
Junior Member
Junior Member
Posts: 23
Joined: 2017-07-10, 15:22 UTC

Post by *DaPaleRider »

It is also not working for me.

Somebody else some ideas?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3862
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

The only way I'm aware is just:

Code: Select all

Command: cd
Parameter: ?c:\Program Files\
This shows the complete path which you may edit then ...
#5767 Personal license
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

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.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Simple AskParam solution:

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"
You can make it more user friendly by adding more default servers to list and setting more descriptive label text.
Post Reply