Page 1 of 2

how to get path for two panes using predefined parameters?

Posted: 27 Oct 2009 15:24
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.

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

Posted: 27 Oct 2009 16:15
by Stefan

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

Posted: 27 Oct 2009 17:29
by paul0
Thanks, Stefan:-)

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

Posted: 16 Dec 2009 20:47
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. :)

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

Posted: 16 Dec 2009 21:14
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");

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

Posted: 16 Dec 2009 22:39
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.)

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

Posted: 16 Dec 2009 23:55
by jayfischer
@Stefan and TheQwerty - Thanks.

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

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

Posted: 17 Dec 2009 15:46
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

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

Posted: 17 Dec 2009 15:58
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

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

Posted: 17 Dec 2009 18:15
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

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

Posted: 17 Dec 2009 18:41
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.

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

Posted: 17 Dec 2009 21:35
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.

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

Posted: 18 Dec 2009 00:22
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>";

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

Posted: 18 Dec 2009 00:34
by jayfischer
Thanks Stefan - I added "run" AND quotes around both vars and its working now.

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

Posted: 18 Dec 2009 00:38
by Stefan
Fine :D you're welcome.