-
text file export script with strange end of line character
hi people
I’ve written a small script to export 3d positional data from a layer to a .txt file ( with a lot of inspiration from Paul Tuersley’s AEtoC4D script). I’m using writeln() and all is grand when viewed on a mac (textEdit and BBedit) but when the text file is opened on a PC (in notebook) it doesn’t understand the end of line character (presumably \n) and shows a small square with no return. After some research I tried using a “\r\n” on the end of the line as opposed to the writeln() but still no luck, also tried “\r” and “\n” individually but no luck. On the mac all 4 options perform the carriage return, but on the PC i get the same non character. I tried going backwards opening the pc created file on the mac and it looks exactly the same as my mac created version ???
I did notice in Paul’s script he had this line – theFile.lineFeed = “macintosh”;
I did try swapping in “windows” and “msdos” and commenting out entirely but no luck.any light that could be shed on this issue would be greatly appreciated.
cheers../daniel