Re: Breaking up a long string
Re: Breaking up a long string
- Subject: Re: Breaking up a long string
- From: John Delacour <email@hidden>
- Date: Thu, 19 Jun 2003 11:00:19 +0100
- Mac-eudora-version: 6.0a23
At 11:48 pm -0500 18/6/03, Joseph Weaks wrote:
Any suggestions on a better way to do this?
set thisParagraph to "A really long paragraph that I need to break
into longer chunks..."
You need an apostle!
What about this:
set p to "Not a very long paragraph but long enough"
set {n, ls, f, pp} to {12, {}, "/tmp/a" as POSIX file, return & return}
open for access f with write permission
write p to f
close access f
open for access f
repeat
try
set end of ls to read f for n
on error
exit repeat
end try
end repeat
close access f
set my text item delimiters to pp
set paras to "" & ls
set my text item delimiters to ""
paras
JD
.
_______________________________________________
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.