Search within groups

D

dburnham

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel
Email Client: pop

I am looking for a tool, perhaps Applescript, to permit me to search within a very long group to find an address that should be removed from the group. Will appreciate any help on this. WIlling to pay for software or plug-in or script that can do this.
 
E

Ed Kimball

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel
Email Client: pop

I am looking for a tool, perhaps Applescript, to permit me to search within a
very long group to find an address that should be removed from the group. Will
appreciate any help on this. WIlling to pay for software or plug-in or script
that can do this.

Have you tried opening the group and clicking on the "Sort list" button to
put it in sorted order? That should greatly reduce your search time and
wouldn't require a separate tool.
 
B

Barry Wainwright

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel
Email Client: pop

I am looking for a tool, perhaps Applescript, to permit me to search within a
very long group to find an address that should be removed from the group.
Will appreciate any help on this. WIlling to pay for software or plug-in or
script that can do this.


try this one (watch out for linewraps):

-- Delete Address from Group v1.0 (2008-06-29)
-- an applescript by Barry Wainwright <mailto:[email protected]>
-- Deletes a group entry matching an input address
-- written in response to a request on
news://microsoft.public.mac.office.entourage
-- This script released under a Creative Commons Attribution,
NonCommercial, ShareAlike 2.0 England & Wales License.
-- see <http://creativecommons.org/licenses/by-nc-sa/2.0/uk/> for full
details

tell application "Microsoft Entourage"
try
set theAddressBook to first address book whose name is "address
book"
on error errMsg number errNum
display dialog "Can't find local Address Book!" buttons {"Abort"}
default button 1
return
end try

try
set theGroups to name of every group of theAddressBook
on error errMsg number errNum
display dialog "No Groups Defined!" buttons {"Abort"} default
button 1
return
end try
if (count theGroups) > 1 then
set groupAnswer to choose from list theGroups with title "Group
Selection" with prompt "Please choose a group to search..." OK button
name "Select" cancel button name "Abort" without empty selection allowed
and multiple selections allowed
try
if not groupAnswer then return
end try
set theGroup to first group of theAddressBook whose name is
(groupAnswer as text)
else
set theGroup to first group of theAddressBook whose name is
(theGroups as text)
end if

set dialogReply to display dialog "Please enter the address to be
deleted from Group \"" & name of theGroup & "\":" default answer ""
set searchTerm to text returned of dialogReply
delete (every group entry of theGroup whose address of content
contains text returned of dialogReply)
end tell
 
Top