• 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
Creating a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a list


  • Subject: Creating a list
  • From: Peter Baxter <email@hidden>
  • Date: Sun, 30 Aug 2009 07:36:09 +1000

Hi people,

I'm trying to create a list from a text file of every word in it that has 5 characters.  This shouldn't be so hard, but I keep failing in the task. Can anyone help?
(OS X 10.6)

set theFile to choose file
set thisText to ""
try
set fileRef to open for access theFile
set textTo to read fileRef
set myWords to words of textTo
on error errString
display dialog "There was an error reading the file because:" & errString ¬
buttons {"OK"}
return
end try

Peter Baxter
 _______________________________________________
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

  • Follow-Ups:
    • Re: Creating a list
      • From: Christopher Stone <email@hidden>
    • Re: Creating a list
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Snow Leopard AppleScript Release Notes
  • Next by Date: Illustrator CS4 and Acrobat File question
  • Previous by thread: Getting Mailbox problem....
  • Next by thread: Re: Creating a list
  • Index(es):
    • Date
    • Thread