Dim $s ;a循环
Dim $ss ;b循环
$a = IniReadSection('d:\a.ini', "搜索")
$b = IniReadSection('d:\b.ini', "搜索")
For $s= 1 To $a[0][0];Loop
For $ss = 1 To $b[0][0]
$result = StringCompare(($b[$ss][1]),($a[$s][1]))
If $result > 0 Then
IniWrite("D:\same.ini", "相同的单词", "key", ($a[$s][1]))
EndIf
Next
Next
Exit
这样写又什么问题,我试验只能对比出一行
a.ini
[搜索]
1=hello ok normal
2=very good
3=how are you
4=fire work
b.ini
[搜索]
1=very good
2=hello ok normal
3=how are
4=fire work
5=you thank
$a = IniReadSection('a.ini', "搜索")
$b = IniReadSection('b.ini', "搜索")
Dim $c=1
For $a_L= 1 To $a[0][0];Loop
For $b_L = 1 To $b[0][0]
If StringCompare(($b[$b_L][1]),($a[$a_L][1])) > 0 Then
IniWrite("same.ini", "相同的单词", "key_"&$c, ($a[$a_L][1]))
$c+=1
ExitLoop
EndIf
Next
Next
Exit