Title: Re: Shameless request for script
On 11/16/00 12:03 AM, "David Leitch" <[EMAIL PROTECTED]> wrote:
> Is there a script that will take a list of contacts that have category X and
> make a mailing group out of them, so that I can send an email to all
> contacts of category X?
>
If you have a lot of contacts, it’s slower than it should be because of a bug in Entourage's scripting (no ‘whose clauses’ for category). With my 200 contacts, it takes only a couple of seconds, however. If you have Akua Sweets scripting addition installed, the list of categories presented to you (to choose one) will be in alphabetical order; if not, not. You can sort the group (in E’s feeble sort by first name) afterwards. Or get my script Group. Sort E (in the Group Stuff E folder) to sort all your groups by last name. (You can get it at <http://homepage.mac.com/berkowit28/ >)
-----------------CATEGORY GROUP E --------------------
tell application "Microsoft Entourage"
set theCategories to (name of every category)
try
set theCategories to order list theCategories -- Akua Sweets
end try
choose from list theCategories with prompt "Which category should define the new group?"
if result = false then
error number -128
else
set catName to item 1 of result
end if
set theContacts to every contact
set groupList to {}
set num to (count theContacts)
repeat with j from 1 to num
set n to item j of theContacts
set nCategories to get n's category
try -- forget it if no email address
if nCategories contains {category catName} then set end of groupList to ("\"" & n's name & "\" <" & n's default email address & ">")
end try
end repeat
set theGroup to make new group with properties {name:catName, group entry:groupList}
end tell
--------------------------end script----------------------------------
--
Paul Berkowitz
- Archiving via mailbox Bruce Sanderson
- Re: Archiving via mailbox Allen Watson
- Re: Archiving via mailbox Bruce Sanderson
- Re: Archiving via mailbox Allen Watson
- Shameless request for script David Leitch
- Re: Shameless request for script Paul Berkowitz
- Re: Shameless request for scrip... Michael W. Wellman
- Re: Shameless request for s... Paul Berkowitz
- Re: Shameless request for scrip... George Clark
- Re: Shameless request for script Andrew R. Schmiechen
- Re: Shameless request for scrip... Paul Berkowitz
- Re: Shameless request for scrip... Allen Watson
- Re: Shameless request for s... Andrew R. Schmiechen
- Re: Shameless request f... Word.Net
- Any Apple Scripters up ... Word.Net
- Re: Any Apple Scripters... George Clark
