Re: Stepping through lines in a variable of text
Re: Stepping through lines in a variable of text
- Subject: Re: Stepping through lines in a variable of text
- From: Michelle Steiner <email@hidden>
- Date: Sat, 1 Dec 2001 10:52:54 -0700
On 12/1/01 9:40 AM, Kai Edwards <email@hidden> wrote:
>
So, while I'm sure someone will come up with a better suggestion, you could
>
just try modifying your script to read something like this:
>
>
set {TID, text item delimiters} to {text item delimiters, return}
>
repeat with x from 1 to (count text items in textvariable)
>
set linetoread to text item x of textvariable
>
-- do analysis of that line (linetoread) here
>
end repeat
>
set text item delimiters to TID
set textvariable to ,
"this is line 1
this is line 2
this is line 3
this is line 4
this is line 5"
repeat with x from 1 to (count paragraphs of textvariable)
set linetoread to paragraph x of textvariable
--analysis here
end repeat
Alternatively,
set linestoread to paragraphs of textvariable
repeat with linetoread in linestoread
--analysis here
end repeat
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------