• 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: Standard Additions 'read' command - basic questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Standard Additions 'read' command - basic questions


  • Subject: Re: Standard Additions 'read' command - basic questions
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 19 Jan 2004 01:51:30 -0600

Hello Chap,

At 23:35 -0600 01/18/2004, Chap Harrison wrought:

The first thing I noticed was that a single invocation of 'read' appears to return the entire *file* as a list!! Is this how 'read' is supposed to work?

Interesting. It doesn't happen for me using simple text records and your delimiters (on Panther).

If so, are there any limits as to the length of a list?

Lists can be very, very large on Panther.

The second problem was that 'read' doesn't care for my high-end delimiters:

set foo to (read fid using delimiter (ASCII character 254)) -- also tried 255

A NULL character will work fine for the record delimiter.

Are 0xfe or 0xff not valid delimiters as far as AS is concerned?

Evidently not.

The Satimage osax (or Smile) will handle your delimiters just fine.

set fl to alias "Lao-Tzu:Users:chris:Desktop:testRead"
set delim to ASCII character 255

set findSpec to "[^" & delim & "]+"

try
set RecordList to find text findSpec in fl with regexp, all occurrences and string result without case sensitive
on error
set RecordList to false
end try

How big a file are you processing?


Chris
_______________________________________________
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: 
 >Standard Additions 'read' command - basic questions (From: Chap Harrison <email@hidden>)

  • Prev by Date: Re: Standard Additions 'read' command - basic questions
  • Next by Date: Re: how to get the text selection in an applescript
  • Previous by thread: Word 98 problem in OS 9 (won't record!)
  • Next by thread: Re: Standard Additions 'read' command - basic questions
  • Index(es):
    • Date
    • Thread