AutoHotkey: Launch external diff

From TotalcmdWiki
Jump to: navigation, search

This script will launch my favorite diff program from within the internal compare window, taking the two files as parameters.

The hotkey is F2, adjust if necessary.

The program is Beyond Compare, adjust if necessary (WinMerge is given as another example, in the commented line).

	if WinActive( "ahk_class TFileCompForm" )
		ControlGetText sFile1, TAltEdit1
		ControlGetText sFile2, TAltEdit2
		Run "%ProgramFiles%\Beyond Compare 2\BC2.exe" "%sFile2%" "%sFile1%"
;		Run "%ProgramFiles%\WinMerge\WinMerge.exe" "%sFile2%" "%sFile1%"

Back to AutoHotkey