Page 1 of 3

Left and Right Path

Posted: 13 Jun 2011 03:00
by Zodler
Hello everyone. I'm in the process of evaluating few things to buy this software.
I want to run a program that gets two arguments which are the left and right paths in dual pane view.

I use open command and I see <curpath> but see no variables to pass the left or the right path as arguments.
I did a search here with no results.

Re: Left and Right Path

Posted: 13 Jun 2011 10:31
by Stefan
Hi Zodler, welcome.

First, you could do an dirty trick and use

$A = "<curpath>";
focus "PI"; //PI: Pane Inactive
$B = "<curpath>";
focus "PI";




But there are also direct commands like

run myprog <get path a> <get path i>;

Try this in address bar:
::msg "<get path i>";
(For an help read <here>, section A, Point 2)


or use
$A = get("path", a);
  $B = get("path", i);



Please note that that are pseudo code only and you have to take care especially with quotes "".


In XYplorer press F1 and go to "Advanced Topics"
and read there "Scripting Commands Reference" and "Variables" sections.

Re: Left and Right Path

Posted: 16 Jun 2011 18:51
by Zodler
I have noticed a bug. I run this:

run "Z:\......................\Beyond Compare 3\BCompare.exe" "<get path 1>" "<get path 2>";

now in left pane go into a folder for example C:\Folder
in the right pane go to the root of the pane 1, its C:\ here

now if right pane is activated, running that script passes C:\Folder and C:\ which is correct
But if Left Pane is activated, running that script passes C:\Folder and C:\Folder to BCompare.exe!

Re: Left and Right Path

Posted: 16 Jun 2011 19:54
by admin
Zodler wrote:I have noticed a bug. I run this:

run "Z:\......................\Beyond Compare 3\BCompare.exe" "<get path 1>" "<get path 2>";

now in left pane go into a folder for example C:\Folder
in the right pane go to the root of the pane 1, its C:\ here

now if right pane is activated, running that script passes C:\Folder and C:\ which is correct
But if Left Pane is activated, running that script passes C:\Folder and C:\Folder to BCompare.exe!
Really? Not able to reproduce. :?

Re: Left and Right Path

Posted: 16 Jun 2011 20:10
by Zodler
What are you executing exactly?

Re: Left and Right Path

Posted: 16 Jun 2011 21:04
by admin
Zodler wrote:What are you executing exactly?
::echo "<get path 1>" "<get path 2>";

Re: Left and Right Path

Posted: 16 Jun 2011 21:11
by Zodler
Yes, no that works correctly, I just tried it. It must be the run command. Try with the run command.

Re: Left and Right Path

Posted: 16 Jun 2011 21:27
by admin
Zodler wrote:Yes, no that works correctly, I just tried it. It must be the run command. Try with the run command.
Tried this, again no problems:

Code: Select all

run "C:\Programme\WinMerge\WinMergeU.exe" "<get path 1>" "<get path 2>";

Re: Left and Right Path

Posted: 16 Jun 2011 21:46
by Zodler
Ok, I just downloaded WinMerge like you have and installed it and was able to reproduce the same BUG with WinMerge by typing:
::run "C:\Program Files (x86)\WinMerge\WinMergeU.exe" "<get path 1>" "<get path 2>";

http://winmerge.org/

Please tell me what is your left and right path and which one is activated when you run the command.

Re: Left and Right Path

Posted: 16 Jun 2011 23:03
by Stefan
9.80.1012 on XP SP3

Can confirm at same partition.
C:\Programme --- C:\

Can't confirm for different partitions
C:\Programme --- E:\


Test:

::run "e:\Beyond Compare 3\BCompare.exe" "<get path 1>" "<get path 2>";
::run "e:\WinMerge\WinMergeU.exe" "<get path 1>" "<get path 2>";

Works, open folder and drive from both panes:
C:\Programme --- C:\

Don't works, opens the pane with the subfolder two times:
C:\Programme --- C:\

And vice-versa panes switched.




Same mistake for

$A = get("path", a);
$B = get("path", i);

run "e:\a\WinMerge\App\WinMerge\WinMergeU.exe" "$A" "$B";


.

Re: Left and Right Path

Posted: 16 Jun 2011 23:09
by Zodler
Thanks. So you are confirming you get the same BUG?
Will you fix it? Is it easy to fix?

Re: Left and Right Path

Posted: 17 Jun 2011 09:14
by admin
Zodler wrote:Thanks. So you are confirming you get the same BUG?
Will you fix it? Is it easy to fix?
It's not a scripting bug. Looks like an issue with the command line syntax of winmerge. I have no time to research this now unfortunately.

EDIT: OK, I might have got it. Both paths must be slashed:

Code: Select all

run "C:\Programme\WinMerge\WinMergeU.exe" "<get path 1>\" "<get path 2>\";

Re: Left and Right Path

Posted: 17 Jun 2011 10:53
by Zodler
It's not only a winmerge problem. I don't use winmerge at all and installed it because you used it. I get the same error with Beyond Compare. I use that.

Re: Left and Right Path

Posted: 17 Jun 2011 11:30
by eil
checked with "\" and BCompare - works fine :wink:

Re: Left and Right Path

Posted: 17 Jun 2011 11:33
by Zodler
What are your left and right folders?

Please when you report mention what are your left and right folders and what you did exactly to help this matter. because otherwise it doesn't help that much.