Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help with addressbook adding an email.

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Return (enter) Key and mouse.  
Author Message
Becker

External


Since: Mar 12, 2011
Posts: 1



(Msg. 1) Posted: Sat Mar 12, 2011 9:28 am
Post subject: Help with addressbook adding an email.
Archived from groups: alt>comp>lang>applescript (more info?)

I am tring to add a new email to a contact. I am working off of this
site.
http://www.macosxtips.co.uk/index_files/bulk-edit-address-book-.html

What I am really trying to do is update the contact from another data
source. I am also using rb-appscript. If that helps any. I am trying
to get the apple script down and use the translational tool they
have.

tell application "Address Book"
repeat with i from 1 to (count every person)
set theEmailAddresses to properties of emails of person i
repeat with j from 1 to (count of theEmailAddresses)
if value of item j of theEmailAddresses contains "@googlemail.com"
then
set oldAddress to value of item j of theEmailAddresses
set AppleScript's text item delimiters to {"@"}
set firstBit to first text item of oldAddress
set newAddress to firstBit & " "
--AT THIS POINT I WANT TO ADD A NEW EMAIL ADDRESS NOT CHANGE THE
CURRENT ONE.
end if
end repeat
end repeat
save
end tell

Any help would be amazing! Thanks
Becker

 >> Stay informed about: Help with addressbook adding an email. 
Back to top
Login to vote
Patrick Stadelmann

External


Since: Nov 12, 2003
Posts: 382



(Msg. 2) Posted: Sat Mar 12, 2011 1:26 pm
Post subject: Re: Help with addressbook adding an email. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
,
Becker wrote:

> What I am really trying to do is update the contact from another data
> source. I am also using rb-appscript. If that helps any. I am trying
> to get the apple script down and use the translational tool they
> have.

make new email at end of emails of person i¬
with properties {label:"whatever", value:newAddress}

Patrick
--
Patrick Stadelmann

 >> Stay informed about: Help with addressbook adding an email. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Adding New Folder - Below is script that I need to create a new folder in the same folder as the location of the script. It runs and compiles but the folder is never created. I have checked other areas and no folder is created at all even though I don't get an error from....

Adding alarm to iCal event - I export data from Mr. Tides to iCal. I would like to add alarms to two kinds of events. iCal's dictionary suggests this is possible, but when I ask for an event's properties, there is nothing about alarms. The following script fails with the error..

Email, PDF and Filemaker Pro - I want to create a script which, from FileMaker Pro's Print, will instead of a normal print, create a PDF file, save the PDF to a specific folder on the hard drive, and then create an email which will have the PDF file as an attachment. The email woul...

Parsing an email - Hi, first, I'm quite a newbie in applescript, so don't cry if the question looks stupid i was projecting to parse some messages (that raise certain mail rules) to find some useful information in them the trick is that they are html messages, so i..

How can I send an email? - Hi, I would like to automatically send an email with the new IP address when the IP address changes. I wrote an applescript that copies the ip address to the clipboard. Do I need an email program or can Applescript send emails? I don't care so much if..
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]