URI coding for Address Book entry?

Posted:
in macOS edited January 2014
http for web pages, file for files, and Apple has a few of their own (itunes, etc)...



Does anyone know if there's a URI coding for an Address Book entry? I'd like to be able to embed a link in a document that when clicked will take you to that entry in Address Book.

Comments

  • Reply 1 of 3
    defiantdefiant Posts: 4,876member
    would this help?
  • Reply 2 of 3
    If I understand your posting right, I think you can find the answer here:



    http://www.macosxhints.com/comment.p...der=&pid=18161



    It is in the form:



    Code:


    addressbook://addressbook-id







    or



    Code:


    addressbook://addressbook-id?edit







    if you want to edit it. Getting the id of the addressbook record can be a bit intersteing. You either have to go through AppleEvents (such as AppleScript) to Addressbook.app like this:



    Code:




    tell application "Address Book"

      get the id of the first person

    end tell









    or through the AddressBook.framework, the Coccoa header is at:



    file:///System/Library/Frameworks/AddressBook.framework/Versions/A/Headers/



    you would be looking to get the
    Code:


    kABUIDProperty



    property. Some usefull documentation can be found on your system, and on http://developer.apple.com/ue/addressbook/.
  • Reply 3 of 3
    kickahakickaha Posts: 8,760member
    Excellent! Thanks to both of you.
Sign In or Register to comment.