Re: Keep lines
Re: Keep lines
- Subject: Re: Keep lines
- From: Paul Skinner <email@hidden>
- Date: Wed, 30 Jul 2003 17:13:53 -0400
On Tuesday, July 29, 2003, at 07:54 AM, Paul Moortgat wrote:
I've an EXIF text file from which I need to keep some lines (like 1,
6, 7, 11, 17) Each time the same lines. How can this be done in
Applescript? How to start?
Paul Moortgat
On Wednesday, July 30, 2003, at 02:42 PM, Paul Moortgat wrote:
Thanks everyone for the zero answers I got.
Paul Moortgat
First; learn patience. One day on the list isn't that long for a post
to go unanswered.
Next post more information. What are the line endings? What do you want
to do with the lines you keep?
It could look something like this...
set output to {}
set f to (choose file) as text
set d to read file f as text
set l to paragraphs of d
repeat with i from 1 to length of l
if i is in {1, 6, 7, 11, 17} then
set output to output & item i of l
end if
end repeat
set AppleScript's text item delimiters to return
return output as text
...But it's hard to say with only the info you posted.
PS
_______________________________________________
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.
References: | |
| >Keep lines (From: Paul Moortgat <email@hidden>) |