I saw your post over on the Cow (I don't have an account there) and wondered why you didn't ask me direct. I have to say, I'd rather you hadn't posted the direct download link for the script on there.
Are you running the script on Win or Mac? Normally, if you write to a file on Win the text file will open on there fine, although not if you write on Mac but open in Win. But with my script I seem to remember that I am doing specific things to ensure C4D can read the text file, even though this is at the expense of the line returns being messed up on Win, so that may be adding to the confusion.
You could try experimenting with a basic script like this to see if you get the same result:
Code: Select all
{
var theFile = new File (Folder.myDocuments.absoluteURI + "/test.txt");
theFile = theFile.saveDlg("Save test file.");
if (theFile != null) {
theFile.open("w","TEXT","????");
theFile.writeln("test");
theFile.writeln("test");
theFile.writeln("test");
theFile.close();
}
}