Advertisement
TLama

Untitled

Oct 10th, 2013
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.41 KB | None | 0 0
  1. [Code]
  2. procedure InitializeWizard;
  3. var
  4.   LineIndex: Integer;
  5.   StringList: TStringList;
  6. begin
  7.   StringList := TStringList.Create;
  8.   try
  9.     StringList.LoadFromFile('c:\SomeFile.xxx');
  10.     if StringList.Find('Line text to find', LineIndex) then
  11.     begin
  12.       StringList[LineIndex] := 'Modified line text';
  13.       StringList.SaveToFile('c:\SomeFile.xxx');
  14.     end;
  15.   finally
  16.     StringList.Free;
  17.   end;
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement