楼主看看下面的代码,你是不是这个意思啊(假设ADD为头的每一句话内容在一行上,文件为1.txt)FileCopy(@ScriptDir & "\1.txt", @TempDir & "\1.txt",1)
$File = FileOpen(@TempDir & "\1.txt", 0)
$nFile = FileOpen(@ScriptDir & "\1.txt", 2)
While 1
$Var = FileReadLine($File)
If @error = -1 Then ExitLoop
$name = StringRegExp($Var, "name=(\d{6}) ", 3)
$password = StringRegExp($Var, "password=(\d{6}) ", 3)
If $name[0] = $password[0] Then
$Var = StringReplace($Var, "disabled=no", "disabled=yes")
EndIf
FileWriteLine($nFile, $Var)
WEnd
FileClose($File)
FileClose($nFile)
ShellExecute("1.txt")
|