View Full Version : Importing and Exporting txt. files???
xikr0n
04-28-2004, 09:13 PM
I have seen an example of this but this is what im looking to do... I would like to be able to hit a button allowing me to open a text file in a "INPUT" field which would then allow me to edit the text and then once edited. i would like to be able to hit a separate button allowing me to save the changes...Is this possible and could some one share an example script or file
Stefan_M
04-29-2004, 12:20 AM
use actions like
Button Load
_String=TextFile.ReadToString("Path+YourFilename")
Input.SetText(input1, _String);
Button Save
_String = Input.GetText(input1);
TextFile.WriteFromString("Path+YourFilename",_String,false)
Stefan
mrdude
07-07-2004, 10:59 PM
This works:
Load Button:
result = TextFile.ReadToString("AutoPlay\\Docs\\file.txt");
Input.SetText("Input1", "" .. result);
save Button:
result = Input.GetText("Input1");
TextFile.WriteFromString("AutoPlay\\Docs\\file.txt", "" .. result, false);
Obviously the name of you text file would be "file.txt" , and your input box is called "input1"
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.