robmaggs
03-08-2008, 07:10 AM
Hiya, I want to create a program to take several sets of data from user input, store the data and finally combine the elements together in a single text file.
I want to have three input fields comprising of a one line title, followed by a multi line summary and then finally a multi line body.
The problem is I'm not sure how to get ams to insert carriage returns when I append the data
Here's what I've done so far
title = Input.GetText("Input1");
summary = Input.GetText("Input2");
body = Input.GetText("Input3");
TextFile.WriteFromString("C:\\article.txt", title, false);
TextFile.WriteFromString("C:\\article.txt", summary, true);
TextFile.WriteFromString("C:\\article.txt", body , true);
This looks clumsy to me too, my logic says I should do something like:
Textfile.WriteFromString(C:\article.text", variable1, variable2, variable3, false);
and have carriage returns inserted after each variable.
Any suggestions would be gratefully received.
Many thanks Rob
I want to have three input fields comprising of a one line title, followed by a multi line summary and then finally a multi line body.
The problem is I'm not sure how to get ams to insert carriage returns when I append the data
Here's what I've done so far
title = Input.GetText("Input1");
summary = Input.GetText("Input2");
body = Input.GetText("Input3");
TextFile.WriteFromString("C:\\article.txt", title, false);
TextFile.WriteFromString("C:\\article.txt", summary, true);
TextFile.WriteFromString("C:\\article.txt", body , true);
This looks clumsy to me too, my logic says I should do something like:
Textfile.WriteFromString(C:\article.text", variable1, variable2, variable3, false);
and have carriage returns inserted after each variable.
Any suggestions would be gratefully received.
Many thanks Rob