• 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: Christopher Nebel <email@hidden>
  • Date: Fri, 24 Mar 2006 09:17:42 -0800

On Mar 24, 2006, at 8:41 AM, Luther Fuller wrote:

I haven't seen the latest postings, since Apple's Mailing Lists seem to be offline.
A little experiment indicates that the proper way to read a text file as lines of text is to use


set textList to read refNr using delimiter {(ASCII character 10), return}

The result is a list of strings where each string is a line of text. It works correctly for both return delimited and linefeed delimited files without having to worry about which delimiter is used.

Unless you're looking at a Windows-generated file, in which case you'll get extra blank lines since their standard line ending is "\r \n". You can't handle that with "read", because delimiters are limited to a single character. We have a bug filed on that.



--Chris Nebel AppleScript and Automator Engineering

_______________________________________________
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: 
 >Re: Return or No Return (From: Luther Fuller <email@hidden>)

  • Prev by Date: [ann] Appscript Installer 1.3 released
  • Next by Date: Photoshop: how to 'delete' (i.e. like pressing backspace)
  • Previous by thread: Re: Return or No Return
  • Next by thread: RE: Return or No Return
  • Index(es):
    • Date
    • Thread