Re: I have a "write to file" dream
Re: I have a "write to file" dream
- Subject: Re: I have a "write to file" dream
- From: Eric Geoffroy <email@hidden>
- Date: Fri, 04 Mar 2011 09:32:12 -0800
- Thread-topic: I have a "write to file" dream
Thanks Paul, that's spiffy. Much, much nicer than piping out to 'tr \r \n
- Eric
> It's pretty easy to modify wordsandstuff to use whatever line endings you want
> in a couple of lines before you write it to file, even if you don't know what
> line endings it's starting out with:
>
> set theLines to paragraphs of wordsandstuff
> set {oldDelims, AppleScript's text item delimiters} to {AppleScript's text
> item delimiters, (return & linefeed)} -- CRLF
> set wordsandstuff to theLines as text
> set AppleScript's text item delimiters to oldDelims
>
> If you need to it work also pre-OS 10.5, use "\n" instead of linefeed.
>
> If (as you should) you always set text item delimiters before setting a list
> to to text, you can forget about oldDelims and lose a line of script.
>
> --
> Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden