CompareIt!
Contents
Overview
CompareIt! has a number of features that makes it a perfect tool for being used from APL:
- Supports ASCII as well as UTF8 files
- Supports two fonts, for example a non-Unicode APL font and a Unicode APL font
Can be called with several command line parameters which makes it handy to run CompareIt! from within APL
Can be integrated into TotalCommander and SubVersion
- Allows editing the files to be compared
- Comes with superb merging features
Furthermore, it is stable and cheap, and the support offered by Igor Green is outstanding.
You can download and try CompareIt! from http://www.grigsoft.com/
Configuration
Fonts
First thing to do is to let CompareIt! use an appropriate APL font. If you use Dyalog 12 Unicode or better, the "APL385 Unicode" font is the right one. If you are using Version 12 Classic, or an older version of Dyalog, either "Dyalog Std" or "Dyalog Alt" is the right choice.
But what if you got to deal with different versions of APL? There is good news: you can specify two fonts and toggle between them with Ctrl+F12!
To tell CompareIt! which font to use select from the "Options" menu the "Options" command, then click on "Edit" in the left part of the upcoming dialog box.
Here you see what needs to be changed:
Tabs
Make sure that the check box "Save spaces, no tabs" is ticked - by default it is not! This prevents CompareIt! from inserting tabs into APL code which APL would not appreciate.
Line comparison
CompareIt! has a very useful line-comparision feature which is disabled by default. Select "Lines View" from the "Options" menu to enable it.
APL Syntax
CompareIt! allows the definition of custom syntax. That allows you to hightlight APL syntax. You don't need to compile the definition file, it's APL.chl. This file needs to go into the "Syntax" folder of the "CompareIt! folder in C:\Program Files or whatever that is on your machine.
These are the steps to tell CompareIt! to make use of that syntax definition script:
- Select "Options" from the "Options" menu.
- Click "File Filters"
- If there is no "APL scripts" in the list, click the "Add" button
- In the "Name" field, type a description for the file (APL scripts?!)
- In the "Mask" field, define one or more file masks. *.dyalog would make sense for Dyalog APL, for example.
- Select "Custom" from the "Syntax" drop-down list.
- Browse to the location of the APL.chl file.
Of course CompareIt! will make use of the syntax definition file "APL.chl" only for those files that match your "Mask" definition.
Calling CompareIt! from APL
You might find it useful to call CompareIt! from APL. You need to know where the executable is located. No problem on your own machine, but if you switch machines, things are different. Make this independent by asking the Windows Registry for its location. The key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Compare It!_is1\InstallLocation
Note that this will work only if during the installation process the "use Windows Registry" options was checked since otherwise CompareIt! won't write anything into the Windows Registry.
CompareIt! and Total Commander
If you are using Total Command and want to integrate CompareIt! with Total Commander:
Get the two together
Find wincmd.ini file - it's location is listed in Help>About
- Open it in any editor and find [Configuration] section
Add this line under found section: CompareTool=c:\...\wincmp3.exe and replace the dots by the proper path on your machine.
- Save file and restart Total Commander.
To ensure that everything is working properly, select 2 files in same pane and choose File>CompareByContent command from menu. CompareIt should open with your selected files.
Comparing selected files
Compare It! on button bar
To add a shortcut to Compare It! simply drag the CompareIt! exe file and drop it to the button bar; a new button will appear automatically. You can try to start the application by clicking it.
Now we have to change parameters in order to compare two files currently selected in left and right panes. Click at the new shortcut with the right mouse button and choose "Change..." to access the button properties dialog. We are interested in the "Parameters" field; fill it with:
%P%N %T%M
Comparing two files with the same name
If you often compare two files with the same names but in different directories then consider creating a second one but specify
%P%N %T\
in its "Parameter" field.
This allows you to select the file in just one pane. Total Commander will automatically feed CompareIt! with the other name then.
Note: since Compare It! supports zip archives you can also use this second button to compare a file with its zipped version: for this just select the file in one pane and the archive in the other one. Note that the file in the ZIP archive will be found no matter where in the zip file it resides.
-- KaiJaeger 2010-01-31 21:40:14