Hola Greco, te sale el error porque te falta un parametro cuando llamas a tu función GetTex, también puedes hacerlo utilizando StringList y sus funciones Delimiter y DelimiterText.
Código Delphi
[-]
var
slFile, slLinea, slFileNuevo : TStringList;
begin
slFile := TStringList.Create; slLinea := TStringList.Create;
slFileNuevo := TStringList.Create;
slLinea.Delimiter:='|';
slFile.LoadFromFile('archivo.txt');
slLinea.DelimitedText:=slFile[slFile.Count-1];Cargamos la ultima línea y lo separa en slLinea
if slLinea[slFile.Count-1]<>Str then
begin
for i:=1 to slFile.Count-1 do
slFileNuevo.Add(slFile[i]);
slFileNuevo.Add(str);
slFileNuevo.SaveToFile('Archivo.txt');
end;
end;
Si lo que tienes en las lineas de tus archivos no tiene espacios en blanco, te funcionara bien, pero si lo tubieras necesitas colocar a True la función StrictDelimiter, lo malo es que esta función esta en un Delphi posterior a Delphi 7. Pero tenemos otra función ExtractStrings que lo puedes utilizar en vez del Delimiter y DelimiterText, esa función no te traera problemas y te separara también la linea en el StringList utilizando el delimitador que le pongas.
Saluditos