#include <array.au3>
$fileA = 'a.txt'
$fileB = 'b.txt'
$StrA = FileRead($fileA)
$StrB = FileRead($fileB)
$StrA = StringRegExp($StrA, '(?m)^.*', 3)
$StrB = StringRegExp($StrB, '(?m)^.*', 3)
If UBound($StrA) <> UBound($StrB) Then
MsgBox(0, '', $fileA & ':' & UBound($StrA) & ' 不等于 ' & $fileB & ':' & UBound($StrB))
Exit
EndIf
Dim $STR3=''
For $i = 0 To UBound($StrA) - 1
$STR3 &= $StrA[$i] & @CRLF & $StrB[$i] & @CRLF
Next
MsgBox(0,'@crlf',$STR3)
Dim $STR3=''
For $i = 0 To UBound($StrA) - 1
$STR3 &= $StrA[$i] & @LF & $StrB[$i] & @LF
Next
MsgBox(0,'@crlf',$STR3)
Dim $STR3=''
For $i = 0 To UBound($StrA) - 1
$STR3 &= $StrA[$i] & @CR & $StrB[$i] & @CR
Next
MsgBox(0,'@crlf',$STR3)
;~ $resultfile = 'resul.txt'
;~ If FileExists($resultfile) Then FileDelete($resultfile)
;~ FileWrite($resultfile, $STR3)
;~ $str = FileRead($resultfile)
;~ ShellExecute($resultfile)
;~ MsgBox(0, '结果', $str)
|