Local $Flag = 0, $Inserted = 0, $new = ""
For $a = 1 to _FileCountLines("1.txt")
If not $Inserted And $Flag then
$new &= "新行" & @CrLf
$Inserted = 1
EndIf
If FileReadLine("1.txt", $a) = "我在这里" And not $Inserted then $Flag = 1
$new &= FileReadLine("1.txt", $a) & @CrLf
Next
msgBox(0, '', $new)
页:
1
[2]