Re: Mac or UNIX file (Malcolm Fitzgerald)
Re: Mac or UNIX file (Malcolm Fitzgerald)
- Subject: Re: Mac or UNIX file (Malcolm Fitzgerald)
- From: Chris Swain <email@hidden>
- Date: Wed, 6 Dec 2006 21:49:25 +0000
Many thanks for this,
Brilliant!
Chris
Read in enough of the file to be sure that you have several lines,
then
test for the existence of CR or LF. Then you can process lines one by
one.
eg.
set {lf, return, f} to {ASCII character 10, ASCII character 13, choose
file}
read f for 999 -- whatever is appropriate
if (result contains lf) then set return to lf
set fRef to open for access f
repeat
try
read fRef until return
on error
exit repeat
end try
end repeat
close access fRef
malcolm
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden