我有一个包含 2 列的文本文件,我需要使用 autoit 搜索“A”
Column1 Column2
------- --------
1 2
3 A
5 6
$file = FileRead("columns.txt")
$lines = StringSplit($file, @CR)
$count = $lines[0]
For $i = 1 To $count
$line = $lines[$i]
$noExtraBlanks = StringStripWS($line, 7)
$columns = StringSplit($noExtraBlanks, " ")
$columnCount = $columns[0]
For $j = 1 To $columnCount
If $columns[$j] == "A" Then
ConsoleWrite("Line: " & $i & ", Column: " & $j & @CR)
EndIf
Next
Next
如果您需要更多帮助,则需要更精确地确定您想要实现的目标......这里将为您提供给定文件中“A”的位置。