I am trying to use LiveCode to generate some text files that will then be run through a third party tool, but I have run into a problem. On a Mac (what I am currently trying to use) LiveCode seems to write text in the MAC formatting. However, the third party tool only works with files that have been written in the DOS formatting.
The difference between the two files seem to be very little: MAC formatting uses cartridge return as return, whereas DOS uses cartridge return and then linefeed as return. I tried:
Code: Select all
open file theFile for read
read from file theFile until eof
put it into tData
close file theFile
replace cr with cr & linefeed in tData
open file theFile for write
write tData to file theFile
close file theFile
So does anyone know how I can force LiveCode to write in DOS formatting, or is there a way to convert the file from MAC to DOS formatting? (I am happy to use the built in commands that come with Mac OS X, but I cannot use any other tools because I don't have the administrator privileges required to run them. I can, however, use MS Word / Textedit and would be happy to use LiveCode's do xxx as applescript in order to convert the files.)
Thanks,
Andrew