Help with moving contact info using Apple Script in Address Book

Hi folks,
I wonder if someone can help? I imported a few hundred contacts via a Gmail created vCard into my Address Book. The problem is that instead of inserting the email addresses into one of the email fields for each record, it has inserted the email address into the Notes field as follows: "EmailAddress: [email protected]".
I would like help to write an Apple Script that will search my contacts in Address Book, find those with "EmailAddress:" in the notes field, cut the email address that follows it, and pastes it into the Work Email field, carries out the operation for the whole address book and saves the changes.
Can anyone help me write a script for this. I've not used Apple Script before so this will be my first attempt!
Thanks in advance,
ayworld

This should work:
tell application "Contacts"
  activate
          set thePeople to every person whose note contains "EmailAddress:"
          set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
          repeat with thePerson in thePeople
               set nn to thePerson's note
                make new email at end of emails of thePerson with properties {label:"Notes", value:text item 2 of nn}
          end repeat
  save
end tell
It will leave the entry in notes and make the label of the new email 'Notes"
Normally when I post an AppleScript like this I tell the user to test it out before using it on the actual data but in this case I don;t know how you'd do that given there is only one Contacts and only one Contacts database.
Just make sure you have a backup just in case. I tried it here on some dummy entries in my Contacts and it worked OK.
Again this totaly relies on the data you presented. The Notes field has to be in the format
EmailAddress:[email protected]
for this to work.
regards
Message was edited by: Frank Caggiano - If you select all the text in the box, then right click and select Make new AppleScript the script will open in the AppleScript editor. Just make sure you get all the text it is easy to drop the first or last char when selecting.

Similar Messages

  • Need help with Signature on Checks using SAP SCRIPT

    Hi,
    I am looking for some help on how to get the Printer Resident Singature on to the Check using SAP Script. We have a HP Laser 8150 Priter in which the Chip Contains the Signature ( Printer Resident Singaure ) and currentlly the ORACLE application is able to print this signature on the checks. Right now we are in Migration to SAP and we are trying to get this Signature to print on the Check using SAP Script.
    Please help us.

    There are many ways to do this, the simplest way to print the signature is using HEX ENDHEX command.
    1. Print the Printer font list from the printer configuration menu, Find the signature in the font list, next to it there'll be esacape sequence in ASCII and Hex format.
    2. Add the following command in the window of the signature:
    /: HEX TYPE PCL
    /= Enter the Hex escape sequence(begins with 1B) from first step
    /: ENDHEX
    Regards
    Sridhar

  • Help with moving contacts from iPhone 4s

    Hello.  I want to copy my contacts from my iphone 4s and add them to another phone - possibly an Android or new iPhone.  Anyone know how to do this?  Thanks in advance!

    From the address book app on your computer where your contacts should be available as well and/or with the email account you are syncing contacts over the air with.

  • Moving contacts from Outlook 2007 to Mac Address Book

    Hello all,
    I've tried to email VCard attachments of contacts from an Outlook 2007 / Exchange Server account so I can import them into my MAC Address Book. When I look at my sent folder in Outlook, the attachment shows a VCF attachment. When I pick up the email on my MAC using Mail, the attachment always comes back as WinMail.dat which the Address Book doesn't recognize.
    Furthermore, I've tried sending the VCard to a Yahoo email address and download the attachment. That worked fine.
    Was wondering if someone could help me isolate where the issue may be. Thanks.

    If Outlook Express provides for exporting contacts in vCard format, you can send all contacts as vCard attachments to a message sent to an email account you access with the Mail.app. Save the vCard attachments from the message to a created folder on the Desktop and then use the Address Book import feature selecting vCards.
    If OE does not provide for exporting contacts in vCard format, it should provide for exporting contacts as a tab-delimited text file.
    The Tiger Address Book includes a Text File import selection/option.

  • Need help with looping/repeat webpage in Apple Script

    I would like to repeat an action in AppleScript by opening up a URL page in Safari, closing it, and then re-opening it again.
    Can someone please help me with this action? Please be very specific in your response. I am not very familiar with this program.
    Thank you

    tell application "Safari"
        repeat with theURL in theURLs
            make new document
            set URL of front document to theURL
            delay 1
            repeat until ((do JavaScript "document.readyState" in front document) is "complete")
                delay 1
            end repeat
            close front document
        end repeat
    end tell
    This is what I have so far..but it is not working. It only opens it up ONCE. What I want is for the web page to repeatedly be generating every 1 or 2 seconds, after it closes out the previous one.
    I want only ONE website continously being opened up.
    Someone help please!!

  • I have a "Contact" organization issue I need help with.  I organize multiple customers under their account affiliation. I place the people with their contact info under each account name by their dept/role in the notes section of their account. I am l

    I have a "Contact" organization issue I need help with.  I organize multiple customers under their account affiliation. I place the people with their contact info under each account name by their dept/role in the notes section of their account. I am looking to be able to directly dial / email from this info in yet notes section located within a contact. On Blackberry, the notes area entered in a contact can connect directly but on the iPhone those numbers/emails are inactive. I am trying to avoid having to create each of these individuals as a separate contact and keep them under their account affiliation. It is easier to find them.  This does not seem like that complicated of a request and hoping someone can tell me how or share an app that will enable the "notes" within a contact be "active". Hope this makes sense.

    I seem to recall that this question has been asked before and I'm pretty sure that the answer is that you can't do what you want to do with the native contact app. However, there are lots of contact apps out there that pull from the built app's data but have other features. Perhaps one of them would meet your needs.

  • When I flag an email with my gmail account using Apple's Mail App how do I flag and set a reminder that at a specific to follow

    When I flag an email with my gmail account using Apple's Mail App how do I flag and set a reminder that at a specific to time to follow up with that email ?

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • Sending email using apple script...

    I have created a watch folder using apple script that when a file is dropped on it, it automatically opens, formats, and sends out a custom email.
    What I don't understand is, how can I include multiple variables in the "content" section (also known as the body section of the email)? I want to put custom type in the content section that says "There is a file awaiting your review." I also would like to choose an email signature from my mail program to use. Third, I would like to include the name of the file that is being sent....
    I found that by doing {content:iteminfo} I could get the file name...If I do {content:"There is a file awaiting your review."} I could get the custom type I wanted....
    BUT, I can't figure out how to get BOTH of them together in ADDITION to adding a custom email signature...
    I know there are some really smart people out there...Any tips?

    I can't figure out how to get BOTH of them together
    This is just standard AppleScript text concatenation with the &:
    ... {content: "There is a file awaiting your review: " & iteminfo}
    Here you can see I'm concatenating a literal string (enclosed in quotes) and a variable. You can extend this ad infinitum.
    As for the signature:
    tell theMessage to set message signature to signature "My Sig"
    (which assumes you have a signature named 'My Sig'. Adjust as necessary.

  • I need your help with a decision to use iPhoto.  I have been a PC user since the mid 1980's and more recently have used ACDSee to manage my photo images and Photoshop to edit them.  I have used ProShow Gold to create slideshows.  I am comfortable with my

    I need your help with a decision to use iPhoto.  I have been a PC user since the mid 1980’s and more recently have used ACDSee to manage my photo images and Photoshop to edit them.  I have used ProShow Gold to create slideshows.  I am comfortable with my own folder and file naming conventions. I currently have over 23,000 images of which around 60% are scans going back 75 years.  Since I keep a copy of the originals, the storage requirements for over 46,000 images is huge.  180GB plus.
    I now have a Macbook Pro and will add an iMac when the new models arrive.  For my photos, I want to stay with Photoshop which also gives me the Bridge.  The only obvious reason to use iPhoto is to take advantage of Faces and the link to iMovie to make slideshows.  What am I missing and is using iPhoto worth the effort?
    If I choose to use iPhoto, I am not certain whether I need to load the originals and the edited versions. I suspect that just the latter is sufficient.  If I set PhotoShop as my external editor, I presume that iPhoto will keep track of all changes moving forward.  However, over 23,000 images in iPhoto makes me twitchy and they are appear hidden within iPhoto.  In the past, I have experienced syncing problems with, and database errors in, large databases.  If I break up the images into a number of projects, I loose the value of Faces reaching back over time.
    Some guidance and insight would be appreciated.  I have a number of Faces questions which I will save for later. 

    Bridge and Photoshop is a common file-based management system. (Not sure why you'd have used ACDSEE as well as Bridge.) In any event, it's on the way out. You won't be using it in 5 years time.
    Up to this the lack of processing power on your computer left no choice but to organise this way. But file based organisation is as sensible as organising a Shoe Warehouse based on the colour of the boxes. It's also ultimately data-destructive.
    Modern systems are Database driven. Files are managed, Images imported, virtual versions, lossless processing and unlimited editing are the way forward.
    For a Photographer Photoshop is overkill. It's an enormously powerful app, a staple of the Graphic Designers' trade. A Photographer uses maybe 15% to 20% of its capability.
    Apps like iPhoto, Lightroom, Aperture are the way forward - for photographers. There's the 20% of Photoshop that shooters actually use, coupled with management and lossless processing. Pop over to the Aperture or Lightroom forums (on the Adobe site) and one comment shows up over and over again... "Since I started using Aperture/ Lightroom I hardly ever use Photoshop any more..." and if there is a job that these apps can do, then the (much) cheaper Elements will do it.
    The change is not easy though, especially if you have a long-standing and well thought out filing system of your own. The first thing I would strongly advise is that you experiment before making any decisions. So I would create a Library, import 300 or 400 shots and play. You might as well do this in iPhoto to begin with - though if you’re a serious hobbyist or a Pro then you'll find yourself looking further afield pretty soon. iPhoto is good for the family snapper, taking shots at birthdays and sharing them with friends and family.
    Next: If you're going to successfully use these apps you need to make a leap: Your files are not your Photos.
    The illustration I use is as follows: In my iTunes Library I have a file called 'Let_it_Be_The_Beatles.mp3'. So what is that, exactly? It's not the song. The Beatles never wrote an mp3. They wrote a tune and lyrics. They recorded it and a copy of that recording is stored in the mp3 file. So the file is just a container for the recording. That container is designed in a specific way attuned to the characteristics and requirements of the data. Hence, mp3.
    Similarly, that Jpeg is not your photo, it's a container designed to hold that kind of data. iPhoto is all about the data and not about the container. So, regardless of where you choose to store the file, iPhoto will manage the photo, edit the photo, add metadata to the Photo but never touch the file. If you choose to export - unless you specifically choose to export the original - iPhoto will export the Photo into a new container - a new file containing the photo.
    When you process an image in iPhoto the file is never touched, instead your decisions are recorded in the database. When you view the image then the Master is presented with these decisions applied to it. That's why it's lossless. You can also have multiple versions and waste no disk space because they are all just listings in the database.
    These apps replace the Finder (File Browser) for managing your Photos. They become the Go-To app for anything to do with your photos. They replace Bridge too as they become a front-end for Photoshop.
    So, want to use a photo for something - Export it. Choose the format, size and quality you want and there it is. If you're emailing, uploading to websites then these apps have a "good enough for most things" version called the Preview - this will be missing some metadata.
    So it's a big change from a file-based to Photo-based management, from editing files to processing Photos and it's worth thinking it through before you decide.

  • Find raster Image & Vector image in adobe indesign using apple script?

    Find raster Image & Vector image in adobe indesign using apple script?

    Find raster Image & Vector image in adobe indesign using apple script?

  • Can I use "apple script" to auto input xml file to final cut pro and auto export mp4 file?

    Now, I'v a lot of  final cut pro x 's xml, I want to use ""apple script" or other method to auto input xml and output mp4 in final cut pro x . How can I finish it?

    Where did the XML come from? What did it consist of?

  • HT204150 I have a Mac 10.5.8 op system.  My Contacts do not syn with I cloud.  Trying to get my address book complete on both systems and now I have lots of duplicates on I cloud adress book.  How do I efficiently merge the duplictes that are now on I clo

    I have a Mac 10.5.8 op system.  My Contacts do not syn with I cloud.  Trying to get my address book complete on both systems and now I have lots of duplicates on I cloud adress book.  How do I efficiently merge the duplictes that are now on I cloud?

    You cannot use iCloud with Leopard 10.5.8. The minimum requirement is Lion 10.7.2. If you have been syncing your contacts with iCloud you can only have been doing it by some sort of unsupported hack, and if it doesn't work it's unlikely to be possible to find an explanation. If you have been using other (compliant) devices by trying to sync using both iTunes and iCloud you are likely to get duplicates.
    A computer old enough running Leopard may well not be upgradeable to Lion or Mountain Lion, but if you can do so this is the only way you are going to be able to make proper use of iCloud.
    The requirements for Lion are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    To purchase it you will have to ring Apple at the number given at the bottom left of this page.
    The requirements for Mountain Lion are listed here:
    http://www.apple.com/osx/specs/
    It is available from the Mac App Store (in Applications). (If you are currently pre-Snow Leopard you will have to upgrade to that to access the Mac App Store: it's available in the online Apple Store.)
    You should be aware that PPC programs (such as AppleWorks) will not run on Lion or above; and some other applications may not be compatible - there is a useful compatibility checklist at http://roaringapps.com/apps:table

  • How do we transfer contacts and mails from apple mail and address book to Microsoft outlook on my mac

    How do we transfer contacts and mails from apple mail and address book to Microsoft outlook on my mac

    From Contacts, anyway (the new version of Address Book) you can export to a .abbu file and import then into Outlook. I'm not sure about Mail as I only really use Outlook...
    Clinton

  • Cannot transfer contacts from iPhone 3GS to Mac Address book

    Hi there
    I've been searching for an answer all over these forums and google, but to no avail.
    I'm using a 3GS and I'm on Snow Leopard on the mac.
    I have tried resetting the sync utility settings and all other tweaks with the phone and the iTunes panels, but I simply cant add any of the numbers that I have added to my phone on to the mac address book. The contacts are transferred to iCloud though. But there is no way to export the iCloud contacts over to the mac address book either. I have to now manually search for all the new contacts I've added (which is a project in itself) and retype it in the mac address book. Pretty ridiculous!!!!!
    Is there a fix for this or is Apple wanting everyone to buy Lion to use the dektop version of iCloud.
    Please let me know
    Thanks
    Best regards
    Zam Shabeer Thahir

    Hi guys
    Managed to find the solution
    1) On the iPhone go to settings > iCloud > Switch off contacts. (Keep contacts on phone)
    2) Then on the mac go to address book and make an archive of your contacts just in case something goes wrong. You can do this by going to File > Export > Create an archive.
    3) Then delete all the contacts and groups from your mac address book.
    4) Then go to iTunes and backup by right clicking on the iPhone on the sidbar.
    5) Sync
    Your contacts from the phone should repopluate the mac address book
    Hope that helps. It worked for me
    Best regards
    Zam Shabeer Thahir

  • Persons disappear when Scripting the Address Book

    If I modify the note of an Address Book entry via AppleScript, search no more finds this person.
    This is how it goes:
    Put following script in ~/Library/Address Book Plug-Ins/
    using terms from application "Address Book"
    on action property
    return "phone"
    end action property
    on should enable action for thePerson with theEntry
    return true
    end should enable action
    on action title for thePerson with theEntry
    return "Test"
    end action title
    on perform action for thePerson with theEntry
    copy the note of thePerson to aNote
    set aNote to aNote & return & "Foo"
    set the note of thePerson to aNote
    end perform action
    end using terms from
    In AB make person Test Person, with mobile phone number and some text in note field.
    Click the "mobile" tag, and choose action Test. "Foo" will appear as the last line of the note.
    Click some other contact. Quit Address Book, and open it again.
    Search field cannot locate Test Person any more!
    The person still is in Address Book in its correct alpahbetic position.
    The fix to the problem is to quit the Address Book and delete the file ~/Library/Application Support/AddressBook/AddressBook-v22.

    Place the list in an address field, click the TO and change it to BCC.
    If you do not have the Contact Sidebar turned on in the Write window press F9 to turn it on. Then select the contacts or list for the mail and use the Add to BCC button.

Maybe you are looking for

  • VPN Clients Can't Ping Hosts

    I will include a post of my config. I have the clients connecting through the VPN tunnel on the 180.0.0.0/24 network, 192.168.1.0/24 is the primary network for the office. I can connect to the VPN and I do recieve the correct address assignment. I be

  • Please confirm use of mini DVI-Video (s-video) cable with Macbook

    Hi, I have tried to use the Mini DVI-> Video cable with my new Macbook in order to be able to connect to my TV. Unfortunately it doesnt work, I do get the resolution change when I plug in the cable but nothing on the TV. I went back to the local Appl

  • Animated GIF in Flash v. Fireworks

    Hi- I was told that I had to learn Fireworks to create an animated GIF because the animate gifs created through Flash are different. That doesn't make sense to me. Does it?

  • Multiple DimBuilds w/Only One Restructure in MaxL?

    I am doing a series of dimension builds via load rules (v7.1.5). In this case I am building this entire dimension from scratch every time, but I want to preserve data, because there is forecast and plan data in this cube, not just actuals. My problem

  • How to assign project specific task with the newly created projects ?

    Hi All, I need help. I need to assign project specific tasks (which i will be taking from staging table) other than the default task which are assigned during project creation. How do I proceed with this within same package. I am attaching the code o