i am going to try to explain what i want $fr = FileRead(@ScriptDir & "\lastip.txt") $xp = 0 While 1 If $xp < 11 Then $xp = $xp + 1 $f1 = FileReadLine($config, $xp) $text = FileRead($f1, FileGetSize($f1)) $text = StringReplace($text, "Your IP" Or $fr, @IPAddress1) FileDelete($f1) FileWrite($f1, $text) Sleep(200) MsgBox(0, "Edited", "Line : " & $xp) EndIf wend in the lastip.txt there is an ip adress but in the file that a am replacing the string i dont know