• 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
Process all files in a text list!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Process all files in a text list!


  • Subject: Process all files in a text list!
  • From: Rachel <email@hidden>
  • Date: Wed, 29 Aug 2001 07:54:41 -0600

Here is the result that worked. Thanks Marc for the tip on "paragraph" vs
"line".
set currFolder to "FolderLocation:"
set fileList to (currFolder & "FileNameTextList")
***
tell application "Tex-Edit Plus"
open fileList
repeat with i from 1 to (count lines of window 1)
open (currFolder & (paragraph i of window 1))
--do various scripts
close front window saving yes
end repeat
close window 1 saving no
***
My question would be: If one refers to a sentence as a paragraph, then how
does one refer to a paragraph?(in case I want to select paragraphs)

Michelle:
I tried the statements you suggested and they run-time errored. Don't know
why.

Entity Marc K. Myers spoke thus:

> Your script would work pretty much as-is if you would refer to
> paragraphs instead of lines in TE+. When you refer to lines what you
> get includes the carriage return at the end of the line, which messes up
> your file names since they don't really end in carriage returns. When
> you refer to paragraphs you'll get only the characters before the
> carriage return.


  • Follow-Ups:
    • AppleScript and CW5
      • From: Baccar MEDDEB HAMROUNI <email@hidden>
References: 
 >Re: Process all files in a text list? (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: One small Q
  • Next by Date: File Management/Sherlock
  • Previous by thread: Re: Process all files in a text list?
  • Next by thread: AppleScript and CW5
  • Index(es):
    • Date
    • Thread