Re: Reading Text File in only produces one item as list
Re: Reading Text File in only produces one item as list
- Subject: Re: Reading Text File in only produces one item as list
- From: Michelle Steiner <email@hidden>
- Date: Fri, 20 Jul 2007 11:42:53 -0700
On Jul 20, 2007, at 11:14 AM, Dan Doughtie wrote: I am reading in a text file.
First of all, you do not need to have it wrapped in a tell application "Finder" block; it is a direct OSAX call to Standard Additions.
Secondly, to read a file, you do not need to open it for access. Doesn't hurt to do so, though.
Anyway, this script will work for you. You can replace the "choose file" line with the hard coded file name if the file is always the same name and in the same location.
set foo to read (choose file) set start to (offset of "PAGES" in foo) + ((count "PAGES") + 1) set PageInfoSet to paragraphs of text start through end of foo
-- Michelle
-- Power is the ability to not have to please.
|
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden