Cool Tools to use with TextPad - Visual File Compare

Instructional HowTos, posted by users. No questions here please.

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
trids
Posts: 69
Joined: Wed May 07, 2003 10:16 am
Location: South Africa

Cool Tools to use with TextPad - Visual File Compare

Post by trids »

Image
:idea: ... Prestosoft's ExamDiff
is a free tool that you can run standalone or integrate with TextPad, to generate visual file comparisons.

To integrate with TextPad..
  • Download and install ExamDiff as directed.
  • Start TextPad.
  • Select from the Menu: Configure >> Preferences >> Tools >> Add >> Program .. Browse for the ExamDiff.EXE file. >> Apply.
  • In TextPad's Preferences treeview, you will have a new entry for ExamDiff. Select this entry to edit the tool's properties.
  • Set the following values in the ExamDiff tool's dialogue:
    Parameters = "$File" "$prompt(paste 1st filename)"
    Initial Folder = $FileDir
    Prompt for parameters = Off
    Run minimised = Off
    Save all documents first = Off
  • If you do not already have one, create a Keyboard shortcut to the TextPad command EditCopyFileName. I use Alt+Ctl+F
To use..
  • Open both files in TextPad that you wish to compare.
  • On one, apply the EditCopyFileName shortcut, to put the filename onto the clipboard.
  • Select the other file and activate the ExamDiff tool, which will prompt you to "paste 1st filename".
  • Paste the filename and press OK to start ExamDiff.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Thanks for the suggestion trids. Looks like it has potential.

I could not see the text below the image when I looked at the previous message using Netscape 4.79. But the image made it interesting to follow up on. To help others, I have made an attempt here to reproduce the hidden contents. Unfortunately some of the formatting has not been duplicated.

Hidden text:
===========================
Prestosoft's ExamDiff http://www.prestosoft.com/ps.asp?page=edp_examdiff is a free tool that you can run standalone or integrate with TextPad, to generate visual file comparisons.

To integrate with TextPad.
  • Download and install ExamDiff as directed.

    Start TextPad.

    Select from the Menu: Configure, Preferences, Tools; Add Program, Browse for the ExamDiff.EXE file. Apply.

    In TextPad's Preferences treeview, you will have a new entry for ExamDiff. Select this entry to edit the tool's properties.

    Set the following values in the ExamDiff tool's dialogue:
    • Parameters = "$File" "$prompt(paste 1st filename)"

      Initial Folder = $FileDir

      Prompt for parameters = Off

      Run minimised = Off

      Save all documents first = Off
    If you do not already have one, create a Keyboard shortcut to the TextPad command EditCopyFileName. I use Alt+Ctl+F
===================

To use..
  • Open both files in TextPad that you wish to compare.

    On one, apply the EditCopyFileName shortcut, to put the filename onto the clipboard.

    Select the other file and activate the ExamDiff tool, which will prompt you to "paste 1st filename".

    Paste the filename and press OK to start ExamDiff.
====================

Hope this helps, sorry for any errors.

I checked this out and noted that this is a free copy, but there is also a Professional version for $35 USD single user if you are interested. Thanks again trids.
Hope this was helpful.............good luck,
Bob
falcon7600
Posts: 1
Joined: Mon Feb 23, 2004 8:59 pm

TSEPRO

Post by falcon7600 »

I added TSEPRO's text editor for the sole ability to convert a whole file to hex.

I need it to find those hex characters like LF/CR/FF and most importantly the BS.

Works great.

I can use either rapidly but the ability to have it right there and seamlessly work on the same file is great.

www.semware.com
seaktf
Posts: 22
Joined: Tue Mar 02, 2004 10:44 am

Post by seaktf »

I use Compare It! (http://www.grigsoft.com/)

I found it a lot nicer than TextPad's compare, esp your could Send files to it for comparison. And its comparison algo is quite elaborated. Very handy.

I've got a screenshot, but I don't know how to upload the image in this forum :(

[/url]
Lostclown
Posts: 8
Joined: Fri Oct 15, 2004 1:12 pm
Location: Iceland

Post by Lostclown »

I found this idea very interesting.
But wanted to be able to do this without the manual copy paste hassle.
Or more simply, wanted to be able to just open 2 files in Textpad and activate a visual file compare tool.

So I decided to write a script that accepts one filename as a command line paramenter from textpad as trids solution does. Then the script automatically activates textpad, goes to the next document, copies it's name to the clipboard, returns to the inital document, and finally launches my compare tool of choice with those two files as parameters :)

For scripting I used AutoIt
http://www.autoitscript.com/autoit3/

For comparing I used WinMerge
http://winmerge.sourceforge.net/

Both are open source.

My AutoIt script is as follows
Filename : rundiff.au3

Code: Select all

Dim $runline
Dim $prgfile, $prgfolder

$prgfile = "WinMerge.exe /e"
$prgfolder = "WinMerge"

;$prgfile = "ExamDiff.exe"
;$prgfolder = "ExamDiff"

;$prgfile = "ExamDiff.exe"
;$prgfolder = "ExamDiff Pro"

If WinExists("TextPad") Then
   WinActivate("TextPad", "")     ;Activate Textpad
   Send("^{TAB}")                 ;Go to next document
   Send("!eyn")                   ;Copy filename to clipboard
   Send("^{TAB}")                 ;Go back to original document
EndIf

Dim $leftfile = $CmdLine[1]       ;Left filename from TextPad via command line parameter
Dim $rightfile = ClipGet()        ;Right filename from TextPad via clipboard

$runline = @ProgramFilesDir & "\" & $prgfolder & "\" & $prgfile
$runline = $runline & " """ & $leftfile & """ """ & $rightfile & """"
Run($runline)
Then I used AutoIt conversion tool to create an exefile from the script named rundiff.exe

Finally I configured a new Textpad tool as trids explains.
Except you browse to the rundiff.exe file and leave the Parameter = $File and delete $FileDir from Initial Folder to leave it blank.

And pling :)
Note that this displays the active document on the left and the next document on the right in WinMerge.

Regards, Lostclown

EDIT
Tested this with ExamDiff as well and modified the script to work for both.
To make this change you just have to uncomment the correct pair of $prgfile and $prgfolder variables at the top before compiling.
Although I didn't like the old freeware version of ExamDiff very much the Pro shareware version is much better and can easily be recommended.
grindy
Posts: 20
Joined: Mon Aug 29, 2005 6:10 pm

Re: Cool Tools to use with TextPad - Visual File Compare

Post by grindy »

[quote="trids

[*]Set the following values in the ExamDiff tool's dialogue:
Parameters = "$File" "$prompt(paste 1st filename)"
Initial Folder = $FileDir
Prompt for parameters = Off
Run minimised = Off
Save all documents first = Off
[*]If you do not already have one, create a Keyboard shortcut to the TextPad command EditCopyFileName. I use Alt+Ctl+F
[/list]
To use..
  • Open both files in TextPad that you wish to compare.
  • On one, apply the EditCopyFileName shortcut, to put the filename onto the clipboard.
  • Select the other file and activate the ExamDiff tool, which will prompt you to "paste 1st filename".
  • Paste the filename and press OK to start ExamDiff.
[/quote]

In this step:
Parameters = "$File" "$prompt(paste 1st filename)"
Are the quotation marks actually used?
thx
User avatar
trids
Posts: 69
Joined: Wed May 07, 2003 10:16 am
Location: South Africa

Re: Cool Tools to use with TextPad - Visual File Compare

Post by trids »

grindy wrote: Are the quotation marks actually used?
thx
Yes .. otherwise any spaces in the path-or-filename will cause problems
:wink:
Post Reply