Re: Coding Help
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.
References: | |
| >Coding Help (From: Jeff Grossman <email@hidden>) |