Hey guys 
So this is the code:
All it does is save the lines from a richedit to a text file once the button is click. My problem is that say I type "Hello World" into the richedit and save it to the text file, the contents of the textfile looks like this:
Why is this?
The other thing is that as soon as Eset Smart Security is running it won't write to the text file, saying that it is being used by another process!
So this is the code:
Code:
procedure TForm1.btnWriteClick(Sender: TObject);
var
textfile1 : textfile;
begin
AssignFile(textfile1, edtReadFile.text + '.txt');
reset(textfile1);
If FileExists(edtReadFile.text + '.txt') THEN
begin
RichEdit.Lines.SaveToFile(edtReadFile.text + '.txt');
closefile(textfile1);
end
else
begin
ShowMessage('file not found');;
exit;
end;
end;
All it does is save the lines from a richedit to a text file once the button is click. My problem is that say I type "Hello World" into the richedit and save it to the text file, the contents of the textfile looks like this:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}{\f1\fnil MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs16 hello
\par world\f1
\par }
Why is this?
The other thing is that as soon as Eset Smart Security is running it won't write to the text file, saying that it is being used by another process!