• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: breaking on newline
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >breaking on newline (From: email@hidden)

  • Prev by Date: Re: Display dialog + compiled scripts
  • Next by Date: Re: Display dialog + compiled scripts
  • Previous by thread: breaking on newline
  • Next by thread: sh osascript & "no user interaction allowed"
  • Index(es):
    • Date
    • Thread