On May 24, 2005, at 8:00 AM, David Crowe wrote:
I discovered this script, which is somewhat similar to what Paul Berkowitz suggested. The 'add' command definitely is the trick to this! :
What really bites me is that I had used "add" in another script that I had previously written for vacation mail purposes.
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with thisMessage in theMessages
set sender_ to sender of thisMessage
set name_ to extract name from sender_
set address_ to extract address from sender_
set fn to first word of name_
set ln to last word of name_
tell application "Address Book"
set new_contact to make new person
tell new_contact
set first name to fn
set last name to ln
make new email at beginning of emails with properties {label:"other", value:address_}
end tell
add new_contact to group "vacation"
save addressbook
end tell
end repeat
end tell
end perform mail action with messages
end using terms from
-- Michelle
--
I am Dyslexic of Borg. Fusistance is retile. Your ass will be laminated.