Dual Pane Parameters

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Stef123

Dual Pane Parameters

Post by Stef123 »

Been trying to adapt XY to my ingrained habit of 2-pane navigation (only feeling safe when I see the full picture of source and target). My usual workflow calls up other tools (WinMerge, FreeFileSync etc) - but I cannot find parameters to pass my panes to them:
<FolderPathLeft> and <FolderPathRight>
<CurrentItemLeft> and <CurrentItemRight>

And vice versa, from the outside:
XYplorer.exe /L:"D:\SourceFolder" /R:"F:\TargetFolder"

Am I missing something? Would someone please spot me into the right direction?

highend
Posts: 14671
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Dual Pane Parameters

Post by highend »

From the inside:
folderpathleft:

Code: Select all

$folderpathleft = get("Path", 1)
folderpathright:

Code: Select all

$folderpathright = get("Path", 2)
currentitemleft:

Code: Select all

$currentitemleft = get("Item", 1)
currentitemright:

Code: Select all

$currentitemright = get("Item", 2)
And pass these variables to your invokation of the command...

From the outside: By using a script as a command line

Left / Right are changed to set the focus to the left pane without using another focus command.

Code: Select all

"<your path to xy>\XYplorer.exe" /script="::focus 'P2'; goto 'F:\TargetFolder'; focus 'P1'; goto 'D:\SourceFolder';"
One of my scripts helped you out? Please donate via Paypal

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Dual Pane Parameters

Post by FluxTorpedoe »

Hi'

// Duh, highend beat me to it! :) Well, since I've finished it, here it is anyway...

• For pane comparison:

Code: Select all

<get path a> <get path i>
• For items (file or folder) comparison:

Code: Select all

<curitem> <curitemprev>
:arrow: Simply click on your most recent pane or item (which will later become resp. <get path i> or <curitemprev>), then on the old one (which becomes <get path a> or <curitem>). Then run your script with those arguments.

Here's an example:

Code: Select all

"Comparison Program"
  if (<curitem>){
    $older=<curitem>; $newer=<curitemprev>;
  } else {
    $older=<get path a>; $newer=<get path i>;
  }
  run "C:\Program Primes\Comparison Program\Soft.exe" $older $newer;
Command-line arguments or order may depend on your soft. FreeFileSync example can be found here: Script help - path names as arguements

Hope this helps, 8)
Flux

Stef123

Re: Dual Pane Parameters

Post by Stef123 »

Whoa, this turns out MUCH more complicated that I expected. But I am willing to learn.
I am able to create this hardwired (and functcional) user command:

Code: Select all

"..\FreeFileSync\FreeFileSync.exe" -leftdir "D:\Source" -rightdir "F:\Target"
But when I substitute the hard-wired paths with your instructions, I cannot get this to work, no matter what combinations I try (with or without double quotes, with or without "$folderpathleft =")
What am I doing wrong? Would you please spell out the complete syntax for me? The exact phrasing of what goes into the Item-field of my user command (category "open").
Thank you.

highend
Posts: 14671
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Dual Pane Parameters

Post by highend »

-Deleted-

You are trying to do it with a command in the "Open" category?
Won't probably work (because these variables aren't supported there).

Use "Run Script"
Caption: Whatever you name it
Script: run """<path to your ff directory>\FreeFileSync\FreeFileSync.exe"" -leftdir ""<get path 1>"" -rightdir ""<get path 2>""";
One of my scripts helped you out? Please donate via Paypal

Stef123

Re: Dual Pane Parameters

Post by Stef123 »

FluxTorpedoe and highend,
thank you both for your assistance. The folder stuff works now. GREAT.
Will try the same with items .. please stay tuned....

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

Re: Dual Pane Parameters

Post by admin »

Would it help if I added <curpath1> and <curpath2>, or maybe easier: <pane1> and <pane2>?

highend
Posts: 14671
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Dual Pane Parameters

Post by highend »

Maybe just <path1>|<path_a> && <path2>|<path_i>?
One of my scripts helped you out? Please donate via Paypal

Stef123

Re: Dual Pane Parameters

Post by Stef123 »

Yes, there is room for improvement here. This was eating up a lot of time. Those triple """ quotes, not to mention parameters like

Code: Select all

.../script="::focus 'P2'; goto ....
Stuff like that is way over my head. It felt like an admission test to keep out regular users intimidated by programming syntax (and pampered by Click&Shoot dropdowns, I admit).

But this forum makes up for it. Thanks to you guys and your instantaneous help. Big thanks for walking me through this daunting syntax. I really appreciate it.

My personal preference (stolen elsewhere, as usual):
<LeftPane> and <RightPane> to visually denote the side, but I am fine with your suggestions, too.
Parameters.png
Parameters.png (19.52 KiB) Viewed 1735 times

Post Reply