Re: Coding Help
Re: Coding Help
- Subject: Re: Coding Help
- From: Jeff Grossman <email@hidden>
- Date: Thu, 29 May 2003 14:18:37 -0700
Okay, I will give that a try. A couple more questions. The way the script
is written right now, what will happen if those files already exist in that
location? Will it override them, or add to the existing files? How would I
set the script up so I can save them in folders with the date or something
like that?
Thanks,
Jeff
on 5/28/03 3:11 PM, Michelle Steiner at email@hidden wrote:
>
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.
>
--
Jeff Grossman (email@hidden)
Director - Information Systems, Turner's Outdoorsman
http://www.turners.com
_______________________________________________
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.