Question about the use of Pathbar

Hi!

I´d like to be able to execute an EXE-File wich is just being highlighted in a lister and choose the files to go as params using a lister too...

This commandline should then appear in the pathbar for me to edit it if needed and then let it execute.

The only thing I achieved so far is using "Clipboard COPYNAMES" (assigned to [Ctrl][Enter]) to get the name and path of the EXE-File that happens to be highlighted and then switch to the pathbar an press [Ctrl][V] to insert it there.

But I like to press [Ctrl][Enter] for the application AND each file I´d like to send as parameter to the application so that I can build my commandline piece by piece.

For Example I could highlight "NOTEPAD.EXE", press [Ctrl][Enter], then move the lister to another directory, there I would hightlight a file "Readme.txt" and again presse [Ctrl][Enter]. That way the pathbar would have a commandline like "C:\WinNt\Notepad.Exe C:\SomeOtherPath\Readme.txt". I would then switch to the path bar an press [Enter] to run the command...

The Total Commander can do this, and a lot of colleagues are using it, but I want to let them know, there´s a much better Commander around... :smiley:

I hope anybody unterstood what I meant and cares to answer...

Unless I misunderstood your intentions it sounds like you want to do this the hard way. I have numerous buttons set up to launch specific programs which open the currently selected files in DOpus, for example, the following button command code

"C:\Program Files\Adobe\Photoshop 6.0\Photoshp.exe" {f}

Launches the Adobe Photoshop image editor, and the {f} control code sends the currently selected images to the Photoshop to be opened. I like to set up most of my buttons to do these things as 3 button buttons, with a left click simply opening the program, while a right or middle click opens the program and sends the selected files to it.

If I've totally missed the boat as to what you want to do, try rephrasing your request a bit.

Hi, and thanks for your answer!

I can´t use one or more buttons since I don´t know what application from what directory I could need...

I just want to choose the application I need, press [Ctrl][Enter], then choose one or more Files which may or may not be in the same directory press [Ctrl][Enter] for each of them (or for the selection of files) then switch into the PathBar to further edit the command string and then launch it!

I hope I made it clear this time... :confused:

Just an initial idea. Create a button or shortcut with the following command:

{filepath} {dlgmulti}

This will execute the selected file and open a file dialog for the parameters.

{fs} {Fd}
Executes the file selected in the source lister with the files in the destination lister as their argument.

[quote]
Caine wrote:
Just an initial idea. Create a button or shortcut with the following command:

sync:dopusrt /cmd {filepath} {dlgmulti}

This will execute the selected file and open a file dialog for the parameters.[/quote]

Thanks for the hint. I´ll try it, but to me it sounds like half the solution I need, since I still could need to insert some additional params (Options like "/f" or "/s") before lauching the application...

I was more looking for something that copies the actual filename and path into the clipboard AND inserts it at the cursor position in the pathbar. Thus allowing me to put the commandline together piece by piece...

Hmmm... I see. You could always create an external application which appends its argument to the clipboard and then have DOpus call that application each time you press [CTRL][ENTER]. Then paste it into your path bar with [F4];[CTRL][V]

As far as I know, DOpus commands do not have any memory. So it is really hard to automatically append to a previous result.

[quote]
Caine wrote:
Hmmm... I see. You could always create an external application which appends its argument to the clipboard and then have DOpus call that application each time you press [CTRL][ENTER]. Then paste it into your path bar with [F4];[CTRL][V]

As far as I know, DOpus commands do not have any memory. So it is really hard to automatically append to a previous result.[/quote]

Well the command would not really need any kind of memory...

It all would boil down to calling the following:

  1. Clipboard COPYNAMES
  2. Change the Focus to the pathbar
  3. Something like Clipboard INSERTNAMES
  4. Change focus back to Lister.

That´s all... :unamused:

Sounds easy, he? :wink:

You are just using the pathbar as a memory.

The problem would be almost trivial if the ADD parameter of the CLIPBOARD command would also work for COPYNAMES:

CLIPBOARD ADD COPYNAMES

Currently ADD only works for COPY and CUT, not for COPYNAMES.

OK, you´re right there...

Hmm... Didn´t know this one... But if it would work and I would paste the content of the clipboard into the pathbar would I see alls the copied files in the pathbar or only the first/last one? And how would this files be separated? By a CR or a blank? Will the resulting command be executable in the end?

But perhaps something like this could help me:

sync:dopusrt /cmd {fs} {Fd} {dlgmulti} {dlgstring}

It won´t use the pathbar, (so I won´t be able to put some last changes to it) but should come up with almost the behaviour I want...

I´ll try it...

[quote]But perhaps something like this could help me:

sync:dopusrt /cmd {fs} {Fd} {dlgmulti} {dlgstring}

It won´t use the pathbar, (so I won´t be able to put some last changes to it) but should come up with almost the behaviour I want...

I´ll try it...[/quote]

Here is one way to do it:

Define a user command
Name: ExecCmd
Template: CMD/K,ARGS/M
Body: {dlgstring|Enter command|&CMD& &ARGS&}

Create a button with command:
sync:dopusrt /cmd ExecCmd CMD={fs} ARGS={Fd}

The user command is needed to force DOpus to evaluate {fs} and {Fd}

Geniously solved! :smiley: :astonished:

I knew a solution would be found within DOpus!

It´s not perfect (the window poping up is much too small and there´s no Combobox showing older strings who had been used earlier) but... it´s like 95%!!!

Thanks a lot for your brainwork!

A Hint to the DOpus-Developer for the next update:
Make THAT Window (dlgstring) wider PLEASE...

I noticed too. It is quite easy to fix however:

Body: {dlgstring|Enter command|&CMD& &ARGS&}

Just add a lot of spaces after Enter command (and before the following "|"). Not optimal, but it works.

[quote]
Caine wrote:

I noticed too. It is quite easy to fix however:

Body: {dlgstring|Enter command|&CMD& &ARGS&}

Just add a lot of spaces after Enter command (and before the following "|"). Not optimal, but it works.[/quote]

Thanks again! But after some (a lot of...) blanks the dialog just doesn't grow anymore because the text gets wrapped... :unamused:

But still your help was very appreciated... I learned a lot of new things about DOpus that i hadn't quite understood until now...

In one word: THANKS! :smiley: