Re: How to add "\n" to text?
Re: How to add "\n" to text?
- Subject: Re: How to add "\n" to text?
- From: Jaime Magiera <email@hidden>
- Date: Tue, 2 Oct 2001 15:11:05 -0400
Cool. It seems like 10.1 has wonderful improvements throughout the whole
OS. Particularly Applescript. Thanks for the hard work.
Jaime
On Tuesday, October 2, 2001, at 12:56 PM, Christopher Nebel wrote:
As a couple people said, "ASCII character 10" is the works-anywhere
solution. As of version 1.7, AppleScript supports "\n" in strings
directly, just like "\r", so you could do something like this:
write "This is\r a Mac line ending" to mac_file
write "This is\n a Unix line ending" to unix_file
Scripts compiled using "\n" will work correctly with older versions of
AppleScript, though the \n won't be visible when you view the source.
--Chris Nebel
AppleScript Engineering