• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Address Book Groups...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address Book Groups...


  • Subject: Re: Address Book Groups...
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 24 May 2005 14:02:21 -0700


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.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Address Book Groups... (From: David Crowe <email@hidden>)

  • Prev by Date: Re: iCal Calendar Colors
  • Next by Date: Re: Applescript an Automator action?
  • Previous by thread: Address Book Groups...
  • Next by thread: Removeing Due Dates from a Todod
  • Index(es):
    • Date
    • Thread