PDA

View Full Version : How do I save text from a input box into a text file?



nitro
03-27-2009, 06:43 PM
I'm trying to make a sort of "chat" kind of thing...

Where i type a message, I click a big button that says "SEND" or "SAVE" and later, when my sister gets on, she can click "READ" or "OPEN" and it will show the text put into the file in a paragraph object... and she can do the same thing, type a message and save, so i can read it later...

Yes, yes, i know, why not just use EMAIL, OR NOTEPAD? well, i thought it would be fun to make my own program to do this kind of thing... I just can't figure out HOW...:huh

I'm not all that good with AMS scripting, I can make simple stuff, but I can't script if my life depended on it...

Hoping for a quick reply,
~Nitro

boku
03-28-2009, 11:57 AM
-- The string to save
new_contents = Input.GetText("InputBox1");

-- Write out the modified contents of the text file.
TextFile.WriteFromString("C:\\MyFile.txt", new_contents, false);

nitro
03-28-2009, 02:13 PM
Thanks!

I'll try it!

~Nitro