• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keep lines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: Thanks
  • Next by Date: Re: Thanks
  • Previous by thread: Re: Keep lines
  • Next by thread: Finder Scripting: Looking inside packages
  • Index(es):
    • Date
    • Thread