Re: breaking on newline
Re: breaking on newline
- Subject: Re: breaking on newline
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 31 Jul 2002 19:51:25 -0700
On 7/31/02 6:00 PM, "email@hidden" <email@hidden> wrote:
>
I know that I can use the AppleScript constant "return" to break on a
>
return. However, I need to break on newline, which is what TextEdit uses
>
for line endings.
>
>
All of this is on OS X.
>
>
I tried using "
>
" (with a return between the quotes), but it doesn't work at all.
>
>
I tried using "\n",and that works... the first time. However, when you
>
compile, it changes this to a quote with a return between. So the next time
>
you compile the script, it fails again.
>
>
While it would be nice to just have a newline constant (like we have
>
return), it'd be even better if there was a way I could do this with full
>
backwards-compatability.
Just do this at the top of any script that needs it:
property newLine : (ASCII character 10)
Then just use the newLine property instead of return. (I refer to it as 'lf'
myself.)
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.