• 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: Coding Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding Help


  • Subject: Re: Coding Help
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 28 May 2003 15:11:12 -0700

On Wednesday, May 28, 2003, at 01:49 PM, Jeff Grossman wrote:

I have the following applescript. Just wondering if somebody can take a
quick look at it and see if I can, or need to, consolidate some of the
commands or just refine the script a little bit?

How about placing the file names in a list, and looping through the list?

set the fileList to {"OSX:List Addresses:Fishads Addresses", "OSX:List Addresses:Huntads Addresses", "OSX:List Addresses:FishReports Addresses", "OSX:List Addresses:HuntReports Addresses", "OSX:List Addresses:News Addresses"}

set the listnames to {"Fishads", "Huntads", "Fish Reports", "Hunt Reports", "News"}
set repeatLength to count (listnames)

repeat with loop from 1 to repeatLength
set thisfile to open for access file (item loop of fileList)
tell application "LetterRip_Server"
set a_list to subscriber list (Item loop of listnames)
set theCount to count of subscribers of a_list

repeat from 1 to theCount
set theSub to subscriber cur of a_list
set theName to name of theSub
set theAddress to email address of theSub
my WriteFile(thisfile, theName, theAddress)
end repeat
end tell
close access thisfile
end repeat

to WriteFile(myFile, aName, anAddress)
write aName & tab & anAddress & return to myFile
end WriteFile

--Michelle

--
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Coding Help
      • From: Jeff Grossman <email@hidden>
References: 
 >Coding Help (From: Jeff Grossman <email@hidden>)

  • Prev by Date: Re: erasing a file or folder
  • Next by Date: Re: applescripted login
  • Previous by thread: Coding Help
  • Next by thread: Re: Coding Help
  • Index(es):
    • Date
    • Thread