Re: Text file reading...
Re: Text file reading...
- Subject: Re: Text file reading...
- From: Gary Lists <email@hidden>
- Date: Sat, 04 Jan 2003 20:27:35 -0500
On or about 1/4/03 6:53 PM, David Crowe wrote:
>
I need a script that will read text files that are either delimited
>
by 'return' characters or line feed. I won't know ahead which is
>
which.
>
>
Is there a way to do this in AppleScript?
>
>
Currently, I'm using:
>
>
read FileRef before return
>
>
>
which returns one line if the file is delimited with 'return' or the
>
whole file otherwise.
>
>
- David Crowe
David,
Do you mean that you need to read parts of the file? Like paragraphs? Then
use "paragraphs of something" or "something's paragraphs".
You didn't say whether what your script line returns is okay with you or
not. Do you want to return the whole file? Then read "to eof".
Not entirely sure which kind of processing you want: either read the whole
file (then it doesn't really matter what separates lines/paragraphs...does
it?) or only read the file in line/paragraph parts.
Search back a bit in the list archives, and you'll see plenty of routines
for doing either of those (I've been using some from a few weeks ago, IIRC,
just today...some very useful and fast stuff.)
--
Gary
_______________________________________________
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.