#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
$soft = @WindowsDir &"/temp/bc3.exe"
$Vbc = @WindowsDir &"/temp/bc.txt"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Bc2", 370, 287, 261, 202)
$Group1 = GUICtrlCreateGroup("", 8, 8, 353, 193)
$Input1 = GUICtrlCreateInput("D:\聊天冲浪", 121, 47, 121, 21)
$Button1 = GUICtrlCreateButton("浏览", 249, 44, 28, 28)
$Button2 = GUICtrlCreateButton("浏览", 249, 86, 28, 28)
$Input2 = GUICtrlCreateInput("E:\聊天冲浪", 121, 89, 121, 21)
$Progress1 = GUICtrlCreateProgress(56, 144, 262, 16)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("", 8, 208, 353, 65)
$Button3 = GUICtrlCreateButton("对 比", 88, 232, 75, 25)
$Button4 = GUICtrlCreateButton("关 闭", 200, 232, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND")
While 1
Sleep(1000)
WEnd
Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
Local $iCtrl = BitAND($wParam, 0x0000FFFF)
Local $iCode = BitShift($wParam, 16)
Switch $hWnd
Case $Form1
Switch $iCtrl
Case $Button1
Ycliulan()
Case $Button2
Bdliulan()
Case $Button3
duibi()
Case $Button4
Exit
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
Func WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
Local $nID = BitAND($wParam, 0x0000FFFF)
Switch $nID
Case 0xf060
If $hWnd = $Form1 Then
Exit
Else
GUIDelete($hWnd)
EndIf
EndSwitch
EndFunc ;==>WM_SYSCOMMAND
Func duibi()
$Yuancheng = GUICtrlRead($Input1)
$bendi = GUICtrlRead($Input2)
If FileExists($bendi) <> 1 Then
DirCreate($bendi)
EndIf
Azbc()
$Bctxt = FileOpen($Vbc, 2)
FileWriteLine ($Bctxt,"load "& $Yuancheng &" "& $Bendi &"")
FileWriteLine ($Bctxt,"expand all")
FileWriteLine ($Bctxt,"select rt.orphan")
FileWriteLine ($Bctxt,"delete rt")
FileWriteLine ($Bctxt,"option confirm:yes-to-all")
FileWriteLine ($Bctxt,"select lt.newer.files lt.older.files lt.orphan lt.diff.files")
FileWriteLine ($Bctxt,"copy lt->rt")
FileClose ($Bctxt)
_rundos ("del /f /s /q %temp%\*.*")
sleep(2000)
Run ($soft &" @"& $Vbc &" /silent")
While ProcessExists("BC3.exe") <> 0
Sleep(3000)
WEnd
Scbc()
EndFunc
Func Azbc()
FileInstall("bc3.exe",@WindowsDir &"/temp/bc3.exe")
FileInstall("bc3Key.txt",@WindowsDir &"/temp/BC3Key.txt")
EndFunc
Func Scbc()
FileDelete(@WindowsDir &"/temp/bc3.exe")
FileDelete(@WindowsDir &"/temp/Bc3key.txt")
FileDelete($Vbc)
EndFunc
Func Ycliulan()
$ll=FileSelectFolder("浏览","")
If FileExists($ll) Then
GUICtrlSetData($Input1,$ll)
EndIf
EndFunc
Func Bdliulan()
$ll1=FileSelectFolder("浏览","")
If FileExists($ll1) Then
GUICtrlSetData($Input2,$ll1)
EndIf
EndFunc
所需Beyond Compare 在附件里!