Left and Right Path

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Left and Right Path

Post 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.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Left and Right Path

Post 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.

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post 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!

admin
Site Admin
Posts: 66362
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Left and Right Path

Post 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. :?

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post by Zodler »

What are you executing exactly?

admin
Site Admin
Posts: 66362
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Left and Right Path

Post by admin »

Zodler wrote:What are you executing exactly?
::echo "<get path 1>" "<get path 2>";

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post by Zodler »

Yes, no that works correctly, I just tried it. It must be the run command. Try with the run command.

admin
Site Admin
Posts: 66362
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Left and Right Path

Post 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>";

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post 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.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Left and Right Path

Post 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";


.

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post by Zodler »

Thanks. So you are confirming you get the same BUG?
Will you fix it? Is it easy to fix?

admin
Site Admin
Posts: 66362
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Left and Right Path

Post 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>\";

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post 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.

eil
Posts: 1870
Joined: 13 Jan 2011 19:44

Re: Left and Right Path

Post by eil »

checked with "\" and BCompare - works fine :wink:
Win 7 SP1 x64 100% 1366x768|1900x1080

Zodler
Posts: 55
Joined: 13 Jun 2011 02:54

Re: Left and Right Path

Post 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.

Post Reply