Activate / open the address book with applescript

Hi,
I try to open the address book and select a vCard with AppleScript.
If the address book is closed I can achieve this (open / activate the address book) with:
tell application "Address Book"
try
activate
     end try
end tell
If the address book is hidden (command+H) I can use:
tell application "System Events" to set visible of process "Address Book" to true
However if the address book is closed (command+W) neither of these commands are able to put the address book to the front.
How can I activate the address book (make it visible and front) in this case?

Hi,
Try this:
tell application "Address Book"
  activate
          set visible of item -1 of windows to true
end tell
Best wishes
John M

Similar Messages

  • Couldn't Open the Address Book Database - Database is Corrupted

    I get this error message anytime I attempt to modify a record in the address book. I also get this error when attempting to create a new group. I've attempted to restore the Address Book from backups via Time Machine as far 6 months ago.
    I also did some poking around on the web and found an article advising to delete .plist files associated with the Address Book from my user > Library > Preferences Directory.
    I did this but it continues to give this error.
    I really need to update the Address Book or even export what I have and start fresh from reimporting my contacts. I don't know how to do this.
    Any help is much appreciated.

    I followed the advice of Golden Shoes and everything appeared to work. I found out that I had spoken too soon. The next time I opened the Address Book none of the contacts were there. So, I've been doing an import when I need contact information. I import the vcard of all of the contacts I had exported. But, if I click on the File menu to Save them the Save option is greyed out and not available.
    I thought that I might need a reinstall and my intention on getting Snow Leopard meant that I would wait until I upgraded to perform that install.
    I just upgraded to Snow Leopard and the same problem exists but now it seems to have spread.
    Now, if I take the empty address book and add a contact then save the Address Book (The save option is now availalbe). Then close the Address Book, Quite the Address Book and then launch it again, the contact record I added is not there.
    Any help that can be provided would be much appreciated. I really want to use the Address Book to manage my contacts.
    Thanks in Advance

  • HOW TO SEND PERSONALIZED EMAILS (WITH SAME MESSAGE) TO ALL ADDRESSES IN THE ADDRESS BOOK - WITH RECIPIENTS SEEING ONLY THEIR NAME BUT NOT WHO ELSE IS GETTING IT

    HOW TO SEND PERSONALIZED EMAILS WITH THE SAME MESSAGE, BUT WITH THE INDIVIDUAL RECIPIENT'S NAME... (OR NAME AND THE EMAIL ADDRESS) TO ALL ADDRESSES IN THE ADDRESS BOOK - WITH RECIPIENTS SEEING ONLY THEIR OWN NAME WITHIN THE BODY OF THE MESSAGE TO THEM ?
    ALSO, HOW TO ELIMINATE ALL THE OTHER NAMES FROM THE LIST - SO THEY CAN NOT SEE WHO ELSE IS ON THE MAILING LIST, AND WHO ELSE IS GETTING THE SAME MESSAGE?

    In the csv file, the column headers must match the the special references in curly brackets.
    So you either change the column header in .csv file or the bit in the curly brackets in the Template email.
    To change the column header:
    In the example shown below, I wanted to use the first two columns
    'First Name', 'Last Name' note the exact spelling.
    I also wanted the email address which was in a column called 'Primary Email'.
    To make it easier for me, I copied the Primary Email column and inserted it into the third column position and then changed the column header name from 'Primary Email' to 'Email'. (This meant I still had the original column header just in case). see image below.
    But you could just change the column header name from 'Primary Email' to 'Email' without moving column about - up to you.
    At this point check that all the contacts do have a valid email address.
    then save the file.
    If you do not want to edit the .csv file, then you need to edit the template email.
    eg: {{First Name}} {{Last Name}} <{{Email}}>
    change to : {{First Name}} {{Last Name}} <{{Primary Email}}>
    If still having an issue, please post two images.
    One image needs to show the row of column headers used in .csv file.
    The other image needs to show the Template email, so I can see how you have used the curly brackets.

  • Backup Address Book with AppleScript

    I'm using Address Book : Version 4.0.3 (483)
    I try to make a script to backup the address book (database), theis line doesn't do anything : tell application "Address Book" to save addressbook
    I try to use the GUI but again it doen't work :
    tell application "System Events"
    tell application process "Address Book"
    set its frontmost to true
    click menu item "Sauvegarder le carnet d'adresses" of menu "Fichier" of menu bar item "Fichier" of menu bar 1
    delay 3
    click button "Enregistrer" of sheet 1 of window "Carnet d'adresses"
    end tell
    end tell
    In English Fichier = File & "Sauvegarder le carnet d'adresses" = "Back up Database" (menu item) and "Enregistrer" would be in english "Save"
    Thanks for your Help.
    HDR

    Hi,
    Try this:
    tell application "Address Book"
      activate
              set visible of item -1 of windows to true
    end tell
    Best wishes
    John M

  • Parsing Notes Field in Address book with Applescript

    I've been working with Applescript to create a custom workflow for a mailer app that I'm creating. I want to store information about a particular contact in one of the following two formats:
    Either:
    Test 1
    Test 2
    or
    [aDate] | Text text text text
    The | is a delimiter. I want to get the aDate and use that as part of a text and then parse this string into the following:
    {"aDate","Text text text text"}
    Unfortunately all of my attempts seem to treat the notes field as one long string. Has anyone been able to parse the notes field of data?

    Once you get the note paragraph into a string (noteString), useset oldDelims to Applescript's text item delimiters
    set Applescript's text item delimiters to "|"
    set theDate to first text item of noteString
    set theText to second text item of noteString
    set Applescript's text item delimiters to oldDelims
    While Applescript will reset the delimiters, you should always do it yourself as I did.

  • Opening Smart Objects with AppleScript.  How do I open the inner PSD with applescript with a smart object?

    I have a PSD or a PSB.  I need to be able to open all of the smart objects in the file so that i can get to the inner psd files so i can pull data from those.  Is this possible?  If not it definitely should be.  Thank you very much.  I am on a mac and will be using applescript.

    You will NOT be able to do this directly with the model exposed to the AppleScript Dictionary…
    You may be able to dig deeper in to PS with Action Manager code…
    You can record this by using the scriptlistener plug-in…
    As far as AppleScript is concerned this is JavaScript so just pass it to the do javascript command

  • ICal: 'Open in Address Book' Function for 'Attendees' does not Work

    iCal lets you drag a Contact from Address Book to the 'Attendees' field of an iCal Event. (You can also put the information into the field by typing the first few letters of the person's name, and Address Book will automatically populate the field with contacts containing those letters.) When you click on a contact in 'Attendees' and select 'Open in Address Book', it is supposed to open the contact's information in Address Book (in case you needed their phone number, forgot their wife's name, etc.). In the previous version of iCal, this ALMOST worked; it would find someone in Address Book, but it would be the first person in your Address Book list with that first name; not always the person you wanted.
    The problem now is that when you click on a contact in 'Attendees' and select 'Open in Address Book', it simply opens the Address Book application and stops there; it does not go to the contact's data in Address Book. I sent Apple feedback on this problem 3 years ago, and again a few months ago, but it still does not work correctly. Does this work correctly for anyone?

    Mine actually performs the sync, but after a few rounds of syncing, some contacts get deleted, some get their photos removed, some get duplicated, and some get removed from groups. The sync basically puts my address book through a blender. I'm syncing both with MobileMe and Google. Well, that is I tried to. I've decided not to sync with Google since that's what seems to initiate the mess.

  • HOW CAN I PUT E MAIL DIRECTIONS IN THE ADDRESS BOOK

    I don't know how to fill the address book with the e-mail directions, how can i put'em in?

    THANKS

  • How can I access the address file with all contact info and print it?

    i'd like to be able to print out address info, phone no.s, etc but not do that one contact at a time so I'm looking for a file that might have all the contact info available in one place that I can access.

    Export your address book as a Comma Separated (csv) file and then open it in Excel. Then you can arrange the data any way you desire.
    Open the Address Book window and from the menu bar select Tools-Export.

  • My school has a website.  The professor uploads files in Word.  When I click on the link at home using Pages, the download window opens with nothing in it and Safari opens with a blank in the address book.  What Could be wrong?  Wrong set up?

    My school has a website.  The professor uploads files in Word.  When I click on the link at home using Pages, the download window opens with nothing in it and Safari opens with a blank in the address book.  What Could be wrong?  Wrong set up?

    Hi Jo,
    If I'm interpreting this correctly, the Word file downloads correctly, but when you open it in Pages, the link(s) which your instructor has embedded in the Word file are not correctly translated into Pages.
    If the link shows the actual address, you should be able to copy that and paste it into the location bar in Safari, press return, and get to the website that way.
    An alternate route might be to download one of the open source Office applications, OpenOffice.org, LibreOffice, or NeoOffice. These are written to more closely emulate the behaviours of MS Word than Pages, and may provide better support for links embedded in Word files.
    Regards,
    Barry

  • Unable to open mail, address book etc due to this message:  You can't use this version of the application Address Book with this version of Mac OS X. HELP!

    I am transferring my mother's address book and mail etc to my computer from an external hard drive enclosure and am not able to open it due to this message:  You can't use this version of the application Address Book with this version of Mac OS X. HELP!  Is there a way to open her older applications and get the info out?

    her email is in user>Library>Mail folder. Hopefully you've created another user on your Mac for your mother so she would have her own user Library.

  • I'm trying to import contacts from Outlook to mac address book. I've exported as a CSV but when i try to open with the Address book import tool, the file is greyed out and can't be imported

    I'm trying to import contacts from Outlook to Mac address book. I've exported as a CSV but when I try to open with the Address book import tool, the file is greyed out and can't be imported. Any ideas? 
    Thanks,
    Ian

    If you can't get the exported .csv file to work you might consider using Migration Assistant: http://support.apple.com/kb/HT2518, particular if you need to move more than just your contacts.  There is some granularity in the options on what to transfer but I'm not sure if you can choose to just your migrate contacts.

  • A few months ago, my G5 started up with the address book and mail opened at startup. They are not in startup items, and I cannot get this to stop. Any suggestions?

    A few months ago, my power mac G5 began starting up with the address book and mail already open on the desk top.
    Neither of these is in my startup items, so I am at a loss as to stop this behavior.
    Any suggestions?

    Are they in Login items under System Preferences/Users/Login Items?
    In the Dock, right click the Address Book and Mail icons, select Options, and make sure "Open at Login" is not selected.

  • When I access the address book, how can I copy an address without having to open the person's info in the edit window?

    When I find a person's address in the address book and highlight their name in one pane, in the lower pane their info shows up. Unfortunately, highlighting the information I want is disabled. So, I open their info in the edit window, and then click on the appropriate tab.
    Getting a single piece of information is not so inconvenient, but when you're putting together lists it is rather onerous to do it that way.
    Being able to highlight and copy off the address book panes would be cool. Thanks

    In an earlier communication, I had said that this was possible, at least with TB on Windows, but I realize now that it's only possible when a certain add-on is enabled: [https://freeshell.de//~kaosmos/morecols-en.html MoreFunctionsForAddressBook]
    http://chrisramsden.vfast.co.uk/3_How_to_install_Add-ons_in_Thunderbird.html
    Install the add-on, and see if you can now highlight info in the Contact Pane by dragging the cursor. Ctrl-C (or the Mac equivalent) to copy the highlighted text to the clipboard.
    You may notice that right-clicking an address in the Contact Pane now shows a Copy command, but a bug in the add-on prevents this option from being active.

  • Unable to establish a session with the Address Book Server

    I have installed the following
    Sun Java System Messaging Server 7 Update 3
    Sun Java System Calendar Server 6.3
    Sun Java System Directory Server 6.3.1
    GlassFish Enterprise Server 2.1 Patch 2 with HADB support
    Delegated Administrator 7
    Sun Convergence 1 Update 3
    as per the instruction here
    http://wikis.sun.com/display/CommSuite7/Sun+Java+Communications+Suite+7+on+a+Single+Host
    My problem is that when I open outlook and try to add a new contact, I get a message saying:
    Unable to establish a session with the Address Book Server. Contact your server administrator for help or try later.
    When using webmail, I can add contacts just fine.
    How can I fix this problem?
    Thanks
    Edited by: Nevron on 26 ??? 2010 11:31 ??

    Nevron wrote:
    My problem is that when I open outlook and try to add a new contact, I get a message saying:
    Unable to establish a session with the Address Book Server. Contact your server administrator for help or try later.Refer here:
    http://forums.sun.com/thread.jspa?threadID=5424727
    You need to log a Sun support request to get the latest Convergence patch.
    Regards,
    Shane.

Maybe you are looking for

  • How to connect to Apple TV using MacBook Air

    I Subscribe to a British streaming service that does not show the apple tv icon on its downloading screen. i Can get onto Apple TV on the iPad by using control centre, but iPad drops the input often. i Have a MacBook Air that is more reliable streami

  • Request for next updates of Zen Mi

    I have a request for next updates of Zen Micro! Please, add an option in the Zen Micro allowing to disable the blue fading lighting during charging, it is very beautiful, but very disturbing in a bedroom all the night!

  • Motion 4 as a separate purchase?

    I am using Final Cut Express and would like to add the abilities of Motion but don't see it for sale anywhere as a separate program. Does anybody know if it can be purchased separately from the Final Cut Pro Studio package

  • Looking for a Houston area contractor.

    All, EM is looking for a local LabVIEW contractor to help us with additional projects. CLD or CLAD preferrered. Oilfeld experience, RT and FPGA is a plus. Contact: Kenneth Miller Erdos Miller 713-562-4315 [email protected] Local applicants only pleas

  • Locked Image Files - Adam#1

    Here's the situation.... Creating an iWeb site using the Gazette template for my college website. Everything is great until I want to change a published site on the college's non-Mac server. I can publish to my folder on the server great, but when I