Sample - Text files

From kwiki

Jump to: navigation, search
 //Text files sample, using TextFile... functions
 //let's save a file, if it doesn't exist - it will be created.
 TextFileSave("c:\\test file.txt","Hello world!");
 //Load it:
 var $s=TextFileLoad("c:\\test file.txt");
 //and show the contents:
 MessageBox($s);
 //Add some text:
 TextFileAppend("c:\\test file.txt"," Added text...");
 //again, load it:
 $s=TextFileLoad("c:\\test file.txt");
 //and again, show the contents:
 MessageBox($s);
Personal tools
konradp.com