DUal pane: select a file in both panel

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

DUal pane: select a file in both panel

Post by carmenm »

Hi,

I just had to make a diff between two files from 2 different directories. My first thought was to activate dual pane and try to select both file. But obviously there is no way to do that right now.
Is there any way to make both panel active? so that we can do things like selecting files in both panel.

I almost sure of the answer but it was worth asking ;) and may be you will give a better way to do it :P

Thanks a lot

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: DUal pane: select a file in both panel

Post by j_c_hallgren »

carmenm wrote:I just had to make a diff between two files from 2 different directories. My first thought was to activate dual pane and try to select both file. But obviously there is no way to do that right now.
There is a way to do it currently (unless you meant something else)! Just select the first file to be compared on pane 1, then select the second file on pane 2, and then use Edit>Compare>Compare current file on both panes...just because pane 1 becomes inactive when you move to pane 2 does NOT mean that the file selected there is no longer available for this function.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

carmenm

Re: DUal pane: select a file in both panel

Post by carmenm »

Ok good to know about file still being selected. My problem is that i dont want to use the compare from XY but the diff from tortoiseSVN.
It works when selecting 2 files from the same panel, but sadly it doesnt work with dual panes :s

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

Re: DUal pane: select a file in both panel

Post by TheQwerty »

You'll need to script it and do something similar to...

Code: Select all

"Compare Paths"
	Global($g_LEFT, $g_RIGHT);
	$g_LEFT = GetInfo("Path", "a");
	$g_RIGHT = GetInfo("Path", "i");
	Sub("_doCompare");

"Compare Focused"
	Global($g_LEFT, $g_RIGHT);
	$g_LEFT = "<focitem>";
	Focus("PI");
	$g_RIGHT = "<focitem>";
	Focus("PI");
	Sub("_doCompare");

"_doCompare"
	Global($g_LEFT, $g_RIGHT);
	Open("""..\Beyond Compare 3\BCompare.exe"" ""$g_LEFT"" ""$g_RIGHT""");

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: DUal pane: select a file in both panel

Post by j_c_hallgren »

carmenm wrote: My problem is that i dont want to use the compare from XY but the diff from tortoiseSVN.
Oh..ok...you didn't specify that in your OP...that's why I answered as I did...but at least you know that the built-in XY compare works for this situation now.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

carmenm

Re: DUal pane: select a file in both panel

Post by carmenm »

Thanks for the script TheQwerty!

@ j_c_hallgren: sorry i should have mentioned it, i wasnt even remembering that XY could do compare ...

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

Re: DUal pane: select a file in both panel

Post by TheQwerty »

I call that script "ComPain," get it?!? :lol: :roll:

Just wanted to point out (in case it wasn't clear) that it will always use the active pane for the left side, which can sometimes be confusing if you don't pay attention and expect the items to be on the same sides as they were in XY.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: DUal pane: select a file in both panel

Post by j_c_hallgren »

TheQwerty wrote:You'll need to script it and do something similar to...
Remembering that I don't write scripts, so I tried this one adapting it to use my "ExamDiff" (freeware that seems to now be somewhat discontinued) but it just seems to ignore the Open cmd...I get no errors and the pgm doesn't execute...script just ends..any ideas?
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: DUal pane: select a file in both panel

Post by serendipity »

j_c_hallgren wrote:
TheQwerty wrote:You'll need to script it and do something similar to...
Remembering that I don't write scripts, so I tried this one adapting it to use my "ExamDiff" (freeware that seems to now be somewhat discontinued) but it just seems to ignore the Open cmd...I get no errors and the pgm doesn't execute...script just ends..any ideas?
OK, I dont use ExamDiff, but looking at their command line options, this should work for comparing two selected files in two panes.

Code: Select all

  $pane1= <curitem>;
  focus PI;
  $pane2= <curitem>;
  open """C:\Program Files\ExamDiff\ExamDiff.exe"" $pane1 $pane2";
If that does not work, I would try replacing the last line with this:
open """C:\Program Files\ExamDiff\ExamDiff.exe"" ""$pane1"" ""$pane2""";

Just a try.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: DUal pane: select a file in both panel

Post by j_c_hallgren »

Thanks serendipity! Here's what they give as options:

Code: Select all

-Command line options include:
    Usage: ExamDiff [Filename1] [Filename2] [Options]
       Filename1, Filename2 are names of files to be compared
       Options are any of:
          /i    ignore case
          /w    ignore all white space in lines
          /b    ignore changes in amount of white space in lines
          /l    ignore leading white space in lines
          /e    ignore trailing white space in lines
          /t    treat both files as text files
          /d    show differences only
          /n    don't show initial "Compare Files" dialog
          /sd   always show initial "Compare" dialog, even if 
                two filenames are used
          /aN   scroll trough all differences with N second delay 
                and exit after the last difference
          /?,/h print this screen
       NOTE: if options /i, /w, /b, /l, /e, /t, or /d are not set, 
             the last used options remain in effect.
So I tried

Code: Select all

 $pane1= <curitem>;
  focus PI;
  $pane2= <curitem>;
  focus PI;
  open """C:\Program Files\ExamDiff\ExamDiff.exe"" ""$pane1"" ""$pane2"" ""/n""";
which worked and went directly to compare...
I added the second "focus" to reset it back to original pane (right?) based on TheQwerty's vers.

BTW, I did find a link to the old freeware vers in their support forums:
http://www.prestoforums.com/viewtopic.php?f=2&t=495
It has served my basic needs for a text file compare for quite some time.

Upd/Addendum: Dumb question: How would this be adapted to compare two selected files on same pane?
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: DUal pane: select a file in both panel

Post by serendipity »

j_c_hallgren wrote:Thanks serendipity!
Glad it helped. :D
j_c_hallgren wrote: Upd/Addendum: Dumb question: How would this be adapted to compare two selected files on same pane?
This should do.

Code: Select all

$items=getinfo("SelectedItemsPathNames", "+");
 $item1=gettoken ($items,1,"+");
 $item2=gettoken ($items,2,"+");
 open """C:\Program Files\ExamDiff\ExamDiff.exe"" ""$item1"" ""$item2""";

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: DUal pane: select a file in both panel

Post by j_c_hallgren »

Yup...that worked fine...so I put both within one UDC as

Code: Select all

"Compare same pane" 
 $items=getinfo("SelectedItemsPathNames", "+");
 $item1=gettoken ($items,1,"+");
 $item2=gettoken ($items,2,"+");
 open """C:\Program Files\ExamDiff\ExamDiff.exe"" ""$item1"" ""$item2"" ""/sd""";

"Compare dual pane" 
 $pane1= <curitem>;
 focus PI;
 $pane2= <curitem>;
 focus PI;
 open """C:\Program Files\ExamDiff\ExamDiff.exe"" ""$pane1"" ""$pane2"" ""/sd""";
I added the "/sd" to get the initial pgm prompt so I can tweak compare opts if I want before it runs or cancel it out.

Thanks again! 8)
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Post Reply