Welcome to %s forums

BrainModular Users Forum

Login Register

new script function : appendToFile

Tell us what you'd like Usine to do
Post Reply
oli_lab
Member
Posts: 1020
Location: Brittany, France
Contact:

new script function : appendToFile

Post by oli_lab » 30 Oct 2023, 18:05

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
http://oli-lab.org

Win10 I7/16GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Facebook
http://www.facebook.com/pages/OLI_LAB/3 ... 506?v=wall

User avatar
senso
Site Admin
Posts: 4371
Location: France
Contact:

Post by senso » 09 Nov 2023, 22:06

will be implemented in the next major release.

Post Reply