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

Re: Creating a list


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

Thanks Axel,

That should get me started.




Hello Peter,

Do you mean something like the following?

set theFile to choose file
try
set fileRef to open for access theFile
set textTo to read fileRef
set myWords to {}
repeat with myWord in words of textTo
if length of myWord is 5 then copy contents of myWord to the end of myWords
end repeat
on error errString
display dialog "There was an error reading the file because:" & errString ¬
buttons {"OK"}
return
end try


Of course, there could be some room left for improvement; but that's another question... ;-)

Axel

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden



I am a volunteer fire fighter and I live with danger everyday and sometimes she lets me go and fight fires

Peter Baxter
email@hidden



_______________________________________________
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
References: 
 >Creating a list (From: Peter Baxter <email@hidden>)
 >Re: Creating a list (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Finder scripting bugs
  • Next by Date: Re: Finder scripting bugs
  • Previous by thread: Re: Creating a list
  • Next by thread: Re: Creating a list
  • Index(es):
    • Date
    • Thread