External diff program / compare tool

General and specific configuration/INI settings

External diff program / compare tool

Postby Flynn » Mon Jan 30, 2006 10:19 pm

Is it possible to setup a tool item within UltraEdit to call an external program with 2 parameters being the most recent and 2nd most recent windows selected? Just like how the compare tool built into UE does.

The reason I ask is I have Beyond Compare as my external diff program and I don't want to upgrade to UltraCompare.

Thanks for your help.

-Flynn
User avatar
Flynn
Newbie
 
Posts: 5
Joined: Mon Oct 03, 2005 11:00 pm

Re: External diff program / compare tool

Postby MrBillG » Mon Jan 30, 2006 11:02 pm

Hi Flynn

I found this in the help file
UE help wrote:How can I use a different compare application?

By default selecting the Compare Files command in the File menu invokes UltraEdit's own compare utility. If you prefer to use a different compare application you may do this by adding the following setting to the uedit32.ini file under the [Settings] section:

Compare EXE="fully qualified path of EXE"

This setting allows the user to specify a different File Compare program to be used in place of the standard utility provided with UltraEdit. If this is set, UltraEdit will use this EXE in place of its own utility. The only command line parameters passed to the utility will be the file names (with paths) of the files to be compared.

So I'm guessing! By adding

[Settings]
Compare EXE=full name of the compare EXE


you can get what you want. Please note that the full name of the compare EXE must be specified without double quotes even when the path contains 1 or more spaces.

You might want to make a backup of your ini file before making changes.
Cheap insurance and it beats that awful feeling I wish I would of done ...

Good Luck
User avatar
MrBillG
Advanced User
Advanced User
 
Posts: 65
Joined: Sat Aug 07, 2004 11:00 pm

Re: External diff program / compare tool

Postby Flynn » Mon Jan 30, 2006 11:38 pm

That worked. Thanks for the help.

Guess I should RTFM next time.
User avatar
Flynn
Newbie
 
Posts: 5
Joined: Mon Oct 03, 2005 11:00 pm

Re: External diff program / compare tool

Postby boliva » Fri Sep 19, 2008 3:20 pm

I'm specifying a custom compare tool in the config file. When I click on the Compare Files button a dialog window opens up. Can I bypass this window and go straight to the comparison application?
boliva
Newbie
 
Posts: 4
Joined: Fri Aug 15, 2008 8:02 pm

Re: External diff program / compare tool

Postby Mofi » Sat Sep 20, 2008 7:15 am

No, not with this method. To run a compare of 2 text files, UltraEdit need to know which files should be compared. So UE always opens the standard dialog normally used for UC Prof. or UC Lite even when using a different comparison tool because in this dialog you can specify which files should be compared.

If you want to run your compare tool with the current active file and select the second file later directly in the comparison tool you should configure a user tool - see the power tip Create user/project tools.

Be careful to configure the correct options for your comparison tool. I guess, it is a Windows program and not a DOS or 32-bit command line application. The active file can be specified on the command line with "%f" - press button Help in the user tool configuration dialog to get more help about the options. A good idea would be to extract the first icon from your comparison tool (with the dimensions used in UltraEdit) for example with IrfanView and save it as BMP or ICO file and specify this file in the tool configuration dialog for your comparison tool. That would make it easier to identify your comparison tool in UE menu/toolbar.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: External diff program / compare tool

Postby bobkilmer » Tue Mar 23, 2010 8:19 am

It appears that the way UltraEdit passes the file arguments to the external diff program in version 16.00 has changed, so that now, the external diff tool chokes on file paths with spaces. Anyone know of a workaround?
bobkilmer
Newbie
 
Posts: 1
Joined: Thu Jan 07, 2010 10:28 am

Re: External diff program / compare tool

Postby mik0001 » Thu Apr 08, 2010 5:10 pm

No, not yet. But you could ask IDM about that new behavior.
User avatar
mik0001
Basic User
Basic User
 
Posts: 37
Joined: Fri Mar 16, 2007 11:00 pm
Location: Germany

Re: External diff program / compare tool

Postby pietzcker » Fri Apr 09, 2010 2:51 am

Interesting. I wonder if this is related to a bug in UltraCompare where a command line invocation of uc.com garbles the commands passed to uc.exe if the file paths contain spaces. IDM have already acknowledged this; it's currently still there in UC 7.10.0.1010, but you can expect it to be fixed shortly.
User avatar
pietzcker
Master
Master
 
Posts: 241
Joined: Sun Aug 22, 2004 11:00 pm

Re: External diff program / compare tool

Postby rprgrmr » Fri Apr 09, 2010 6:56 am

I contacted IDM support about bad file arguments being passed to the external diff program and they said,

IDM wrote:Thanks for your message. We recently received another report of this and confirmed that this is an issue and actually has been since v15.20. This will be corrected in a future update, and I apologize for the inconvenience.
rprgrmr
Newbie
 
Posts: 3
Joined: Tue Mar 23, 2010 8:26 am

Re: External diff program / compare tool

Postby rprgrmr » Tue Aug 10, 2010 8:52 am

Using UltraEdit version 16.10.0.1042 on Windows 7 Enterprise, version 6.1, build 7600.

The Compare Files feature that used to work with an external diff tool in versions of UltraEdit prior to version 15.20 and stopped working correctly in version 15.20 (it did not pass filenames with spaces in the path properly) now does no more than call the executable and does not pass the file names at all!
rprgrmr
Newbie
 
Posts: 3
Joined: Tue Mar 23, 2010 8:26 am

Re: External diff program / compare tool

Postby mik0001 » Tue Aug 10, 2010 11:30 am

Hm...
UE 16.10.0.1036 is the latest version at the moment, I think.
When I check the command line via Process Explorer the command line contains both files.
(Tested on WIN XP SP3; I will test it on WIN 7 later.)
User avatar
mik0001
Basic User
Basic User
 
Posts: 37
Joined: Fri Mar 16, 2007 11:00 pm
Location: Germany

Re: External diff program / compare tool

Postby rprgrmr » Tue Aug 10, 2010 12:52 pm

I was trying to solve a problem with the default file open directory. Configuration > Directory > "Default open directory" was overriding Configuration > File Handling> Load > "Use active file directory for file open dialog default" on UE 16.10.0.1036. IDM support sent me special user verification build 16.10.0.1042.

I discovered external diff didn't work afterward. May have worked in build 1036. Support acknowledged that external diff was not working in build 1042. I am still awaiting a reply.

I checked external diff command line by configuring a batch file as the diff tool.
@echo off
echo %0 %1 %2 %3
pause
rprgrmr
Newbie
 
Posts: 3
Joined: Tue Mar 23, 2010 8:26 am

Re: External diff program / compare tool

Postby Mofi » Tue Aug 10, 2010 12:55 pm

I tested that now also with UE v16.10.0.1036 by making UC Prof. not visible for UE and adding manually to uedit32.ini under section [Settings] the line

Compare EXE=C:\Temp\Compare Test.bat

The batch file with the space character in the name contained following lines:

@echo off
echo %0 %1 %2
echo.
Pause

As I executed the compare files command, the batch file echos:

"C:\Temp\Compare Test.bat" C:\Temp\File1.txt C:\Temp\File2.txt

Unfortunately the issue with file names containing a space character is still not fixed and therefore calling the "batch compare tool" with the text files renamed to include a space character results in

"C:\Temp\Compare Test.bat" C:\Temp\File 1.txt

instead of

"C:\Temp\Compare Test.bat" "C:\Temp\File 1.txt" "C:\Temp\File 2.txt"
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: External diff program / compare tool

Postby Mofi » Sat Sep 04, 2010 6:53 am

The problem with not enclosing the names of the two files in double quotes is fixed with UltraEdit v16.20.0.1009. Now also files with a space character anywhere within complete file name can be compared with an external tool called by UltraEdit because UltraEdit now double quotes always both file names.

But UltraEdit does not double quote now the name of the compare EXE itself as it has done in previous versions. While

[Settings]
Compare EXE=C:\Temp\Compare Test.bat


worked in previous versions of UltraEdit because the compare EXE was called by UltraEdit always with double quotes, this specification of the tool does not work anymore with UltraEdit v16.20. Either the full name of the compare EXE does not contain a space character, for example by using short name in 8.3 format, or the compare EXE is specified in uedit32.ini with

[Settings]
Compare EXE=
""C:\Temp\Compare Test.bat""

I have not made a typo here. There must be twice 2 double quotes at beginning and end of the full name of the compare EXE. The outer double quote pair is always automatically removed on reading the string value from uedit32.ini.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Configuration/INI Settings