• 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: applescript-users digest, Vol 2 #766 - 16 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript-users digest, Vol 2 #766 - 16 msgs


  • Subject: Re: applescript-users digest, Vol 2 #766 - 16 msgs
  • From: email@hidden
  • Date: Sat, 16 Jun 2001 05:33:35 EDT

>I'm trying to create a script which will take a (very long... probably too
>long for Applescript's memory buffer) list of items in Microsoft Word,
>and eliminate those which are shorter than 4 characters or longer than 9.
Each
>item is separated by a carriage return, and I'd like to eliminate the
>carriage returns along with the deleted item, so that I'm left with a neat
>list with no vertical spaces between items.

Thanks everyone, for your help, and Paul, for the suggestion of Tex-Edit
Plus. A great program, with awesome Applescript support. MS Word is now
unneccessary (whew!) Here's a short script which works:
tell application "Tex-Edit Plus"
delete (every word in window 1 where (length of it is less than 4))
end tell

Two problems which I'm having, though, are: 1. I can't seem to figure out how
to eliminate the carriage returns which go with the deleted words. (The doc
contains a list of words, each followed by a carriage return - this script
eliminates the word, but leaves a blank space between the surrounding items
in the list). 2. This script works on up to a certain length list. Beyond
that, the script hangs up, I have to force quit Tex-Edit, and Applescript
gives me a "timed out" error message. Are there any work arounds, or will I
have to do my lists in smaller chunks?
Again, thanks all.
Andy D


  • Follow-Ups:
    • Re: applescript-users digest, Vol 2 #766 - 16 msgs
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Applescript, AOL, & Webpages
  • Next by Date: Re: Info for question
  • Previous by thread: Re: applescript-users digest, Vol 2 #766 - 16 msgs
  • Next by thread: Re: applescript-users digest, Vol 2 #766 - 16 msgs
  • Index(es):
    • Date
    • Thread