Page 1 of 1

new script function : appendToFile

Posted: 30 Oct 2023, 18:05
by oli_lab
Hi,

For datalogging, it would be cool to have in the script language "st.appendToFile(filename)" just like saveToFile, but not erasing the file each time it is open.

the procedure

procedure SaveToTextFile;
begin
st.create;
st.loadFromFile(fname.asString);
st.add(input.asString);
st.saveToFile(fname.asString);
st.free;
end;

would become

procedure SaveToTextFile;
begin
st.create;
st.setText(input.asString);
st.AppendToFile(fname.asString);
st.free;
end;

Cheers

Olivar

Re: new script function : appendToFile

Posted: 09 Nov 2023, 22:06
by senso
will be implemented in the next major release.