• 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: Return or No Return
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return or No Return


  • Subject: Re: Return or No Return
  • From: kai <email@hidden>
  • Date: Thu, 23 Mar 2006 21:50:52 +0000


On 23 Mar 2006, at 21:18, Luther Fuller wrote:

I have a script with the line

    set textLine to read refNr before return

I use the script to read plain text files saved from Eudora and it has worked correctly for years.
Now, I'm trying to read plain text files saved from Mail and I've found that 'read' incorrectly reads the whole document.
Mail documents DO contain return characters. I've verified this by opening them with TextEdit and TextWrangler.
So, why does 'read before return' ignore the return character?

My Mail documents don't contain return characters, Luther - according to this test:


---------

set t to read (choose file of type {"com.apple.mail.emlx"} without invisibles)
{ASCII_13:return is in t, ASCII_10:(ASCII character 10) is in t}


--> {ASCII_13:false, ASCII_10:true}

---------

So using ASCII character 10 in place of return, as suggested by Paul, works here.

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Return or No Return (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Return or No Return
  • Next by Date: Re: Return or No Return
  • Previous by thread: Re: Return or No Return
  • Next by thread: Re: Return or No Return
  • Index(es):
    • Date
    • Thread