how to get path for two panes using predefined parameters?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
paul0
Posts: 137
Joined: 23 Oct 2009 19:26

how to get path for two panes using predefined parameters?

Post by paul0 »

There is a parameter <xypane> for active pane data path.

<xypane> XYplorer active pane data path

Is there another parameter for inactive pane data path? I don't like to activate the inactive pane to get the path.

thx.


paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Re: how to get path for two panes using predefined parameters?

Post by paul0 »

Thanks, Stefan:-)

jayfischer
Posts: 61
Joined: 22 Nov 2009 21:28

Re: how to get path for two panes using predefined parameters?

Post by jayfischer »

Sorry to bring up an "old" thread.

But I was trying to create a UDC for WinMerge with the active and inactive pane paths. After searching I found this thread that the inactive pane path var does not exist. :cry:

Count this as my vote for an inactive pane path var. :)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: how to get path for two panes using predefined parameters?

Post by TheQwerty »

It's not ideal but this is what I'm using to compare either the paths of each pane or their focused items in Beyond Compare (should be easy to modify for WinMerge):

Code: Select all

"Compare Paths"
	Global($g_ITEM_EVAL);
	$g_ITEM_EVAL = '<curpath>';
	Sub("_doCompare");

"Compare Focused"
	Global($g_ITEM_EVAL);
	$g_ITEM_EVAL = '<focitem>';
	Sub("_doCompare");

"_doCompare"
	Global($g_ITEM_EVAL);
	$pA = Quote(Eval("$g_ITEM_EVAL"));
	Focus("PI");
	$pI = Quote(Eval("$g_ITEM_EVAL"));
	Focus("PI");
	Open("""..\Beyond Compare 3\BCompare.exe"" $pA $pI");

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

Re: how to get path for two panes using predefined parameters?

Post by Stefan »

jayfischer wrote:Sorry to bring up an "old" thread.

But I was trying to create a UDC for WinMerge with the active and inactive pane paths.
After searching I found this thread that the inactive pane path var does not exist. :cry:

Count this as my vote for an inactive pane path var. :)
Hi Jay, there is an work around (as TheQwerty shows us too):

For some external applications like comparing tools you need to launch this app with path or file name from both panes.

Right now (v8.70.0151 - 2009-12-16) you have to do an little trick (FYI: >Here< it is discussed to implement tokens for this issue.)
to provide items from both panes to this app:

* First get the name of the path/item of the first pane,
* then switch the focus to the other pane,
* now get the name of the path/item from this other pane.
* Maybe, if you want, switch focus back to first pane again.

Example script:
$FileOne = <curitem>;
Focus "PI"; //switch focus to other pane
$FileTwo = <curitem>;
Focus "PI"; //switch focus back (if needed)


>Here< is an list of all Script_Variables.

HTH? :wink:

(i have posted my Beyond Compare script >here< and also have tested that WinMerge works with this too.)

jayfischer
Posts: 61
Joined: 22 Nov 2009 21:28

Re: how to get path for two panes using predefined parameters?

Post by jayfischer »

@Stefan and TheQwerty - Thanks.

Stefan, your script works great. I guess I don't need an inactive pane path var after all. :)

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

Re: how to get path for two panes using predefined parameters?

Post by admin »

jayfischer wrote:@Stefan and TheQwerty - Thanks.

Stefan, your script works great. I guess I don't need an inactive pane path var after all. :)
Too late, now you got it: <get path i> :P

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: how to get path for two panes using predefined parameters?

Post by TheQwerty »

admin wrote:Too late, now you got it: <get path i> :P
How is it too late? We've been using that method for months now? And the solution you've used was even outlined in my original proposal for GetControlInfo()! :P

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

Re: how to get path for two panes using predefined parameters?

Post by admin »

TheQwerty wrote:
admin wrote:Too late, now you got it: <get path i> :P
How is it too late? We've been using that method for months now? And the solution you've used was even outlined in my original proposal for GetControlInfo()! :P
Oh yes, you deserve your credits! Although my <get is cooler than your <GCI, no? :P

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: how to get path for two panes using predefined parameters?

Post by TheQwerty »

admin wrote:Oh yes, you deserve your credits! Although my <get is cooler than your <GCI, no? :P
Yes, especially since my <GCI does not exist. :lol:
However my GetControlInfo() blows the pants off of your GetInfo() on paper!

Sometimes it feels like we're just waiting on you to catch up to where we are with scripting! :P
I wouldn't be surprised if jacky comes up with a way to do CEA if you don't get to it soon.

jayfischer
Posts: 61
Joined: 22 Nov 2009 21:28

Re: how to get path for two panes using predefined parameters?

Post by jayfischer »

@Don - thanks for the new var.

But I'm feeling pretty stupid. I have this in a user button.

Code: Select all

"<xypath>\..\WinMerge\WinMerge.exe" <get path> <get path i>
and I'm getting the following error.

Code: Select all

'<get' is not a valid script command.
<get
1
What am I doing wrong?

Thanks.

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

Re: how to get path for two panes using predefined parameters?

Post by Stefan »

For me this works with v8.70.0152 - 2009-12-17

run "<xypath>\..\WinMerge\App\WinMerge\WinMergeU.exe" <get path> <get path i>;
or
run "<xypath>\..\WinMerge\App\WinMerge\WinMergeU.exe" "<get path>" "<get path i>";

jayfischer
Posts: 61
Joined: 22 Nov 2009 21:28

Re: how to get path for two panes using predefined parameters?

Post by jayfischer »

Thanks Stefan - I added "run" AND quotes around both vars and its working now.

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

Re: how to get path for two panes using predefined parameters?

Post by Stefan »

Fine :D you're welcome.

Post Reply