TextPad is my primary text editor. As with most text editors, it has it's own primitive compare tool. While there's no way to specify an external compare tool in TextPad, I did manage to put together something that's pretty darned close.
I set up an external tool in TextPad, which is a CMD file and takes as a Parameter $File. The CMD file runs an AutoIt script.
TextPad uses CTRL-F9 to compare the two most recently selected files. I use ALT-F9. Select File 1. ALT-F9. Select File 2. ALT-F9.
Violets!
CMD file
AutoIt script
I set up an external tool in TextPad, which is a CMD file and takes as a Parameter $File. The CMD file runs an AutoIt script.
TextPad uses CTRL-F9 to compare the two most recently selected files. I use ALT-F9. Select File 1. ALT-F9. Select File 2. ALT-F9.
Violets!
CMD file
Code:
"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "C:\Users\<username>\AppData\Roaming\Helios\TextPad\7\Tools\BeyondCompareQueue.au3" %1
Code:
#include <File.au3> Opt("MustDeclareVars", 1) ;0 = no, 1 = require pre-declare Local $Quote = chr(34) Local $InputFile = $CmdLine[1] Local $ClipboardContents = ClipGet() If FileExists($ClipboardContents) Then If $InputFile = $ClipboardContents Then Local $szDrive, $szDir, $szFName, $szExt Local $TestPath = _PathSplit($ClipboardContents, $szDrive, $szDir, $szFName, $szExt) MsgBox(4096, @ScriptName, "Attempt to compare " & $szFName & $szExt & " to itself") Else ; Local $Command = $Quote & "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" & $Quote & " " & $Quote & $ClipboardContents & $Quote & " " & $Quote & $InputFile & $Quote Local $Command = $Quote & "C:\Program Files (x86)\Beyond Compare 4\BCompare.exe" & $Quote & " " & $Quote & $ClipboardContents & $Quote & " " & $Quote & $InputFile & $Quote Run($Command) EndIf Else ClipPut($InputFile) EndIf
Comment