Address Book Alert or Notification?

I currently use Entourage's address book as a contact manager and want to switch to Mac Address Book to track my clients. I can't figure out how to have a specific Address Book client alert me to call back on a specific date I specify.
For instance, in Entourage, I use it's address book function and set a "To Do Date" for it to remind me to call this client. How is this done in Mac Address Book?

You don't. Unlike Entourage which has multiple functions - calendar, address book, mail,etc. - in a single application, the applications included with Mac OS X are split. Address Book does only that; keep your address book. If you want to schedule events and to-dos, you use iCal.
iCal's To-Do functionality is a bit limited - for instance, I don't know of any way to attach a contact to a To-Do, only to an event, and the attachment to an event is really designed for meetings - so it may or may not work the way you want it to. But you might ask in the iCal forum; someone there might know of a workaround.
Hope this helps.
Message was edited by: Dave Sawyer

Similar Messages

  • How do I use AppleScript to export Address Book contacts?

    Here's what I want to do. I want to execute a series of AppleScript commands which will automatically export every contact I have in my Address Book to a vCards.vcf file (which will be in my Dropbox folder). The reason I want to do this is so I don't have to remember to manually export the contacts every time I change one.
    What are the AppleScript commands I need to run?

    quick&dirty, but it works 8-)
    -- hubionmac.com 06.02.2011
    -- quick&dirty script for exporting contacts as single vCards
    --exisiting vCards will not be overwritten by the script, instead new files will 
    --get an index like "John Smith 1.vcf"
    set doThese to getitem_2process(true)
    tell application "Address Book"
    set destination_path to choose folder with prompt "Destination folder for export:"
    repeat with doThis in doThese
    if first name of doThis is missing value then
    set firstname to ""
    else
    set firstname to first name of doThis
    end if
    if last name of doThis is missing value then
    set lastname to ""
    else
    set lastname to last name of doThis
    end if
    if (lastname & firstname) as text = "" then
    set namestring to "nobody.vcf"
    else
    set namestring to (first name of doThis & " " & last name of doThis & ".vcf") as text
    end if
    set namestring to my checknamewith_pdfsuffix(namestring, destination_path, false)
    my writeToFile((destination_path as text) & namestring as text, (get vcard of doThis), false)
    end repeat
    my display_message(((count of doThese) & " contact(s) exported") as text, 3)
    end tell
    on writeToFile(MacFilePathTxt, txt, add2eof)
    --lastedit 18.01.2011
    if add2eof is false then
    try
    do shell script "rm " & quoted form of POSIX path of (MacFilePathTxt as alias)
    end try
    end if
    set RefNum to (open for access file MacFilePathTxt with write permission)
    try
    if add2eof is false then
    write txt to RefNum
    else
    write txt to RefNum starting at ((get eof RefNum) + 1)
    end if
    close access RefNum
    return true
    on error
    close access RefNum
    return false
    end try
    end writeToFile
    to getitem_2process(askwhat)
    try
    tell application "Address Book"
    activate
    tell application "System Events"
    keystroke "0" using command down --show address-window not matter what...
    end tell
    if askwhat is true then
    set theaction to button returned of (display dialog "Process all or just selection?" buttons {"All", "Selection", "cancel"} default button {"Selection"})
    if theaction = "Selection" then
    set a to every person whose selected is true
    else
    set a to people
    end if
    else
    set a to people
    end if
    end tell
    on error msg
    error "error on getitem_2process" & return & msg
    end try
    end getitem_2process
    to checknamewith_pdfsuffix(n, D, looped)
    --check if filename exists in D
    -- so if "A File.pdf" exists it names it "A File 1.pdf","A File 2.pdf",...
    tell application "Finder"
    set thefiles to name of every item of (D as alias)
    end tell
    if thefiles contains n then
    if looped = false then
    set n to ((characters 1 through -5 of n) & " 1" & (characters -4 through -1 of n)) as text
    my checknamewith_pdfsuffix(n, D, true)
    else
    set tmp to (last word of ((characters 1 through -5 of n) as text) as integer)
    set tmpcount to (count of characters of (tmp as text)) + 5
    set tmp to tmp + 1
    set n to ((characters 1 through (-1 * tmpcount) of n) & tmp & (characters -4 through -1 of n)) as text
    my checknamewith_pdfsuffix(n, D, true)
    end if
    else
    return n
    end if
    end checknamewith_pdfsuffix
    on display_message(msgTXT, msgTimeout)
    tell application "System Events"
    set isRunning to ¬
    (count of (every process whose name is "GrowlHelperApp")) > 0
    end tell
    if isRunning = true then
    tell application "GrowlHelperApp"
    -- Make a list of all the notification types 
    -- that this script will ever send:
    set the allNotificationsList to ¬
    {"Status"}
    -- Make a list of the notifications 
    -- that will be enabled by default.      
    -- Those not enabled by default can be enabled later 
    -- in the 'Applications' tab of the growl prefpane.
    set the enabledNotificationsList to ¬
    {"Status"}
    -- Register our script with growl.
    -- You can optionally (as here) set a default icon 
    -- for this script's notifications.
    register as application ¬
    "Address Book" all notifications allNotificationsList ¬
    default notifications enabledNotificationsList ¬
    icon of application "Address Book"
    --Send a Notification...
    notify with name ¬
    "Status" title ¬
    "Status" description ¬
    msgTXT application name ¬
    "Address Book"
    return true
    end tell
    else
    activate
    display dialog msgTXT giving up after msgTimeout
    end if
    end display_message

  • Lion 10.7.2 On both mac book pro and iMac, both with Lion 10.7.2, obtain repeated iCal event notifications from calendar or address book.  Cannot turn these off.  They repeat several times per session and every time computer is used.  How to diagnose this

    Lion 10.7.2 On both mac book pro and iMac, both with Lion 10.7.2, obtain repeated iCal event notifications from calendar or address book.  Cannot turn these off.  They repeat several times per session and every time computer is used.  How to diagnose this?

    First, uninstall "SuperTV" (whatever that is) according to the developer's instructions. It isn't working and it's filling the log with noise.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time when you had the problem. Post the messages logged before the boot, while the system was unresponsive or was failing to shut down. Please include the BOOT_TIME message at the end of the log extract.
    Post the log text, please, not a screenshot. If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message. When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    PLEASE DO NOT INDISCRIMINATELY DUMP THOUSANDS OF LINES FROM THE LOG INTO A MESSAGE. If you do that, I will not respond.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • How to configure Growl notifications for File Sharing and Address Book...

    Heya,
    So my team and I constantly add new contacts to Address Book and drop files via File Sharing and I would love a way to push growl notifications to people's computers when these actions occur. Or even send emails. Does anyone know how I could accomplish this? If so, can you reference a tutorial or guide of some sort? Thanks!

    The export function from iCloud creates one single .vcf file with all the addresses in it. If you click on it on the desktop, it starts displaying each and every address as a separate vCard. However, "Tools/Import...Address Books...vCard file" doesn't do anything.

  • ICal to alert me to call a contact from Address Book?

    I currently use Entourage's address book as a contact manager and want to switch to Mac Address Book and iCal to track my clients. I can't figure out how to have a specific Address Book client alert me to call back on a specific date I specify.
    For instance, in Entourage, I use it's address book function and set a "To Do Date" for it to remind me to call this client. I was told on the Address Book forum it's not possible unless iCal can do it. How is this done in iCal (other than having to set a new event in meeting-like iCal which would be a real pain)? I have to be reminded of 10 to 30 call-backs each day.
    If this doesn't work, what's my options? If I stay with Entourage I have to deal with syncing to my iPhone via the archaic and entirely reliable Entourage to iCal via Sync Services, and then to my iPhone. I do end up with duplicates calendar entries on occasions.
    B. Other software or ideas?

    Hi Mike,
    I agree with Austin. Applescript will help with this. I've taken a different tack with it though and I'd suggest using Address Book's plug-in structure.
    Copy the script below into Script Editor and make changes to the lines starting "property". You'll need to save this script in your User's Library > Address Book Plug-Ins folder (you may need to make this folder) or it won't work.
    Now when you click on the label of a phone number in Address Book there will be a contextual menu item to "Call <name> later". This will ask you for a date and to add more notes, then it will make a Todo in the calendar you set in the script.
    -- Call Later -- John Maisey -- www.nhoj.co.uk -- 1 May 2009
    -- -- Address Book plug-in
    -- -- Save as CallLater.scpt and add to folder "~/Library/Address Book plug-ins"
    property myCalendar : "Home" -- Calendar to add todo to.
    property myAdvance : 7 -- Default number of days from current date
    property setAlarm : true -- Do the Todos pop up an alarm? (true or false)
    using terms from application "Address Book"
    on action property
    return "phone"
    end action property
    on should enable action for thePerson with theEntry
    if theEntry is not equal to missing value then
    return true
    else
    return false
    end if
    end should enable action
    on action title for thePerson with theEntry
    return "Call " & (name of thePerson) & " later"
    end action title
    on perform action for thePerson with theEntry
    set theName to name of thePerson
    set thePhoneNumber to value of theEntry
    set theURL to "addressbook://" & id of thePerson
    set myDate to text returned of (display dialog "Enter the date to call " & theName default answer (short date string of ((current date) + (myAdvance * days))) with title "Call Later - by John Maisey")
    set myNotes to text returned of (display dialog "Additional notes" default answer return & return with title "Call Later - by John Maisey")
    tell application "iCal"
    try
    set myTodo to make new todo at the end of todos of calendar myCalendar with properties {summary:"Call " & theName, url:theURL, due date:(my date myDate), description:"On " & thePhoneNumber & return & myNotes, priority:medium priority}
    if setAlarm then
    make new display alarm at the end of display alarm of myTodo with properties {trigger interval:0}
    end if
    on error theErr
    display dialog theErr with title "Call Later - by John Maisey"
    end try
    end tell
    end perform action
    end using terms from
    Let us know if you need more details.
    Best wishes
    John M

  • How do I get rid of SYNC ALERT - I think it has to do with Address Book - I keep unchecking and it keeps popping up!!

    Well I was following some instructions on possibly syncing the Mac Address Book with Google and its created havoc.  I dont know if the instructions might have been for a previous OS or what.  I originally was looking for ways to sync the Address Book with Gmail for an Android Phone...but for now, I just exported the Address Book to Gmail and will deal with new contacts as they come.
    But what these instructions told me to do was to go to Address Book/Preferences/Accounts and check Synchronize with Google....Now Im not sure if thats what I want or what exactly that will do.  (Since I already had exported my Address Book contacts to Gmail, the Google contacts should be the same as the Mac ones...but I got an error of 25 changes so I didnt want it to synchronize and tried to cancel it.)
    I keep unchecking the box where it says Synchronize with Google but somehow it keeps getting checked again automatically.  Every now and then a SYNC CONTACTS pop up comes up - and I dont know what to do because it doesnt give me an option to CANCEL ...It just says sync now or sync later...Again it tells me it has found 25 differences...which I find impossible (and when I check 'see details' - it seems like theyre the exact same contacts)...After the popup comes up, I check the Address Book and that sync with Google magically gets checked again -even though I keep unchecking it.
    I dont know what to do !  Everything I find in forums talks about deleting mobileme or isync but I dont have and never have used any of those things.  The forums said to delete isync from your Applications folder, but I dont have it there.
    Any ideas?  I just want to stop the popups!

    See http://kb.mozillazine.org/Location_Bar_search and http://kb.mozillazine.org/Keyword%2eURL (pref:''' keyword.URL''')
    See also [[Searches are redirected to another site]]

  • Can't import address book backup...

    Hi,
    I used to have 10.5 installed on my computer but it was very slow... So I decided to make a clean install of 10.4.
    I backed up my address book contacts from 10.5 but when I try to import them back to 10.4 nothing happens and the computer plays the default alert sound.
    Any suggestions?
    Thanks,

    Thanks BDAqua...
    Sorry for not responding earlier, I supposedly configured my forum account so it would let me know if someone posted something on my question, yet I didn't received any notification about this... Maybe it ended up in my spam folder.
    The scenario is this:
    I had 10.5 and used the backup address book function... It created a file with a .ABBU file with the name Address Book 2008-04-05 and 1.2 Mb of size.
    Then back in 10.4 the Mac recognized the .ABBU file and displays the address book icon on it... When I double click it, Address Book App opens and warns me that I'm about to replace the contents of my Address Book with the contents of the Backup. I click OK and it does nothing but to play the default alert sound.
    Recently I opened the backup file in a friends computer using 10.5 and it opens and restores the contacts just fine, the problem is that I want my computer to have them in order to put them in my iPhone and be able to use them in Mail.
    So, other that upgrading again to 10.5 (that is a no-go since my laptop is dreadfully slow on it) and opening my backup file on a 10.5 machine, export each and every one of my 150+ plus contacts as VCards and then reimporting them back to 10.4, is there any other way to get this working?
    Thanks!

  • Address book .... importing text file

    I am designing an address book which opens a text file called AddressBook.txt which reads in the information in the following format:
    lastname,firstname,street,city,state,zip,phonenumber,birthday,persontype
    lastname2,firstname2,street2,city2,state2,zip2,phonenumber2,birthday2,persontype2
    etc. (with a maximum entries of 500)
    I am having a problem reading in the information without the commas and wrapping to the next line. I can either use the BufferedReader or Scanner to input the file and as you can see below, my code is not complete yet. I can't figure out how to code the storeAddress() method in order to get the addressBookEntries[] to include the necessary information for outputting, sorting, etc. If I can get the information read into the addressBookEntries[], I think I will probably be able to proceed in the rest of the required tasks (i.e. sorting by last name, searching by last name, etc.)
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] =
            new AddressBookEntry[MAX_ADDRESS_ENTRIES];
        String FILE_NAME="AddressBook.txt";
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public void storeAddress(File addressFile){
         Scanner sc=null;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    try {
    // Delimiters specifiy where to parse tokens in a scanner
    sc = new Scanner(addressFile).useDelimiter("\\s*[\\p{,}*\\s+]\\s*");
    catch (FileNotFoundException fnfe) {
         JOptionPane.showMessageDialog(this,"Could not open the file");
    System.exit(-1);
    for(int i=0; i<MAX_ADDRESS_ENTRIES; i++){
         while (sc.hasNext()) {
    lname=(sc.next());
         if (!lname.equals("")){
         addressBookEntries[i].setLName()=lname;
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private Date bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public String toString() {
    return lastName+" "+firstName;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public Date getBday(){
    return bday;
    public void setBday(Date newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public class extPerson extends Person{
    //new clss People
    public class People {
         int MAX_PEOPLE=500;
         BufferedReader bf;
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group[i]+"\n");
              return sb.toString();
    public void read(){
              String str;
              try {
              bf=new BufferedReader(new FileReader(new File(FILE_NAME)));
              str=bf.readLine();
              while (str!=null) {
              insert(str);
                   str=bf.readLine();
         catch (IOException e) {
              // Will jump to here on an eof condition.
         try {
              bf.close();
         catch (IOException e) {}
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public People() {
              group=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              //extPerson guy=new extPerson(data);
              //group[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
         public void clear() {
              // This loop frees up the memory used by each extPerson
              for (int i=0; i<nPeople; i++)
              group[i]=null;
              nPeople=0;
    extPerson group[];
    int nPeople;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();

    Ok, I have changed my code to reflect your suggested changes, but I'm still unsure how to use the findInLine you suggested.... This is all very new to me and I've been looking on the java website for suggestions, but I'm still stumped on how to pull this together. I'm unsure on how to set the lastname,firstname,etc. for retrieval...
    Here's my code:
    //ADDRESS BOOK
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] = new
        AddressBookEntry[MAX_ADDRESS_ENTRIES];
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    //PERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private String bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public void parseString(String s) {
              try {
              lastName = s.substring(0,s.indexOf(","));
              firstName = s.substring(s.indexOf(",")+1);
    address = s.substring(s.indexOf(",")+2);
    city = s.substring(s.indexOf(",")+3);
    state = s.substring(s.indexOf(",")+4);
    zipcode = s.substring(s.indexOf(",")+5);
    homephone = s.substring(s.indexOf(",")+6);
    extPersonType = s.substring(s.indexOf(",")+7);
    bday = s.substring(s.indexOf(",")+8);
    catch(StringIndexOutOfBoundsException sbe) {
              JOptionPane.showMessageDialog(null,"Error " +
    "in Person: Could not parse the line "+s);
    public String toString() {
    return lastName+","+firstName+","+address+","+city+","+
    state+","+zipcode+","+homephone+","+bday+","+extPersonType;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public String getBday(){
    return bday;
    public void setBday(String newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public Person(String data) {
    parseString(data);
    //EXTPERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    //new clss extPerson
    public class extPerson extends Person {       
         int MAX_PEOPLE=500;
         BufferedReader bf;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    String FILE_NAME="AddressBook.txt";
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group1[i]+"\n");
              return sb.toString();
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group1[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public extPerson() {
              group1=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              Person guy = new Person(data);
              group1[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
    Person group1[];
    int nPeople;

  • Mail, Address Book, iCal, Safari problems after 10.4.6 update

    Updated to 10.4.6 from 10.3.9 via purchased Tiger disks, and have been having problems with Apple basic applications.
    Address Book opens, then freezes and must Force Quit.
    iCal opens, then freezes and must Force Quit.
    Mail opens, but cannot retrieve or send. Cannot Quit Mail, and must Force Quit.
    Safari opens, and runs okay, until two letters of text are entered into a search box. I was able to work around this problem by going to Safari > Preferences > Autofill.
    I unchecked AutoFill Web Forms "Using info from my Address Book card", and now I can enter text in a Search Box in Safari. I would also get a freeze when I would click Edit on that line.
    When switching to a backup User Account, all these applications seem to run fine.
    Thanks in advance for any help.
    G4 1.25   Mac OS X (10.4.6)  

    I get the following when I open Mail and Address Book in Console:
    ===== Sunday, May 21, 2006 8:57:19 PM America/Chicago =====
    2006-05-21 20:58:36.955 Mail[456] * Assertion failure in -[ABMutableMultiValue addValue:withLabel:], Framework/AddressBook/ABMultiValue.m:486
    2006-05-21 20:58:36.956 Mail[456] * NSRunLoop ignoring exception 'Invalid parameter not satisfying: value != nil && label != nil && [label length] > 0' that raised during posting of delayed perform with target 4225f0 and selector 'reallyFinishLaunching'
    ===== Sunday, May 21, 2006 8:59:00 PM America/Chicago =====
    2006-05-21 21:01:38.373 Address Book[458] * Assertion failure in -[ABMutableMultiValue addValue:withLabel:], Framework/AddressBook/ABMultiValue.m:486
    2006-05-21 21:01:38.373 Address Book[458] Exception raised during posting of notification. Ignored. exception: Invalid parameter not satisfying: value != nil && label != nil && [label length] > 0

  • ICloud Deleted  Local Contacts From Address Book

    Okay, so I tried setting up an iCloud account so a family member could receive texts and messages via iChat. That was the original goal. I successfully set up an account, but iChat does not allow me to login via the iCloud account that I had set up. After sever attempts I decided to put that on the back burner until I had a little more time to look into it. In doing so I seem to have caused some other collateral damage which I didn't anticipate (see below).
    Unfortunately, as I logged out of iCloud on the iMac, it wiped/deleted every last contact that was in the address book. My question is: How can I get them back?
    I suspect that there is a "previous" or "prior" image of the data what was there. I'm guessing that Apple put some type of safeguard in place for just such an occurrance, though I could be wrong.
    The Machine is a 2011 27" iMac running 10.7.5. The last backup of the address book that I can get to is from 2011. Actually it's the Address Book Folder in users>Library>Applications Support.   I made a copy of the entire system drive AFTER everything was migrated over from the old system that was replaced, and have it on an external drive.
    Some notes:
    - Time Machine was not active or on
    - iCloud was never activated until just recently
    - the person does not own an iDevice with any of the contacts
    - iCloud does not seem to show any contacts to even bring back onto the iMac
    It seems like a really silly thing to have any local data removed AT ALL upon signing out of iCloud. What's on the machine should remain on the machine unless the enduser literally goes out of there way to purposly delete the information stored there. There should be no dialog box what so ever even indicating that data will be removed, and even if the data was removed there should be an easy way to undo the action in case the enuser misinterpreted the action. Before any of the data is removed from the local the information (or at least a copy of it) should have been automatically stored to the cloudspace PRIOR. Why on earth would Apple set it up in such a way where the default is to delete any local data at all?

    No. Absolutely not. We'll just have to agree to disagree. iCloud should be able to be turned on or off on any given device associated with said account. Local stores should be synchronized and that synchronization should happen continuously if connected. When not connected, local stores should maintain their state. What would be the purpose of even bothering to "sync". Or are you saying that in effect everything is copied to a central location (ie the cloud) and any devices wanting access to that data need to be "signed in", and in effect becoming nul terminals with no local store? Why should the default assume users would want to delete the synchronized data upon sign out?  iCloud should be a "use as needed" tool and not an "either/or" tool. In this case *it* should have backed the data up to begin with. That is the purpose after all. I (wrongfully) assumed in haste that the information was backed up or copied elsewhere and that even if I chose to delete it from the local device, I would still have access to it because it was stored "somewhere". And if the data wasn't synced/backed up to "the cloud" upon sign-in, then a friendly reminder alerting the user that now data had yet been saved would certainly go a long way. But this derails the entire thread. All I want to know is whether or not there is a way to retrieve the data that was erased from the iMac?

  • Address book issues: duplicates and syncing to phone

    I know this is a common problem, and why Apple cannot offer a better solution, or system, is frustrating.
    The problem is basically multiple entries in my address book.
    I know the issue has to do with icloud, but I cannot figure out how to eliminate the multiple entries without going one by one and deleting.
    And I hestiate to do this because I am afraid they will come back.
    Frankly, I am very frustrated with icloud.
    As far as I am concerned it has caused more problems than it is worth.
    I am ready to disable it totally.
    Problem is, if I do that now, then all of my contacts in my address boook disappear.
    Part of the problem,. I know, is that I still have a mobilme account, and somehow I have two icloud accounts.
    Question: is there any way to merge my two icloud accounts, so I opnly have one.
    Or can I just delete one? If so, how?
    Another problem, I cannot get my addresses on my mac to appear in my iphone(4).
    I have tried selecting the sync option to replace all addresses on my iphone, one time, with the addresses on the computer, but it doesn't work.
    Certain addresses on my computer do not appear on my phone.
    The other day, I went to my phone to call a contact andf found I had about 6 entries for every contact.
    I had to go in and disable a bunch of accounts, and finally got back to onbe set, but now some contacts are missing.
    Why a simple solution to eliminate showing duplicate entries cannot be found is frustrating.
    Seems simple to me: if the info is duplicated, don't show it.
    Seems like this simpkle rule could also apply to alerts: everytime I get an alert on my phone, it shows up 5 or 6 times in a row.
    But that's another post.......

    Great.
    I think the TM restore would have been much quicker. I was under the assumption that everything was good on the Mac address book.
    Not sure what happened since then.  Did you read my post (at 2:01pm above) before things went wrong?
    "Try this. Disable iCloud on your mac. Select to keep contacts on the computer when quiting. Verify address book contains all your contacts. If you don't have a backup such as TM, export address book contacts so you will have a backup.
    Your address book should have been correct or you could have corrected the contacts then and you would have had the backup files exported if you didn't have or trust TM.
    Go to the iCloud website and delete all contacts there.
    At the iCloud website, you should have been able to select all addresses at one time and delete. That would have left no addresses in iCloud. Only addresses left should have been on your Mac from the last step.
    Once done, go back and log into iCloud on your computer and merge the contacts. The website should now contain the addresses from your address book.
    Unless something else was wrong and creating multiple contacts, the only addresses in iCloud would have been merged from what was in your address book on your computer.
    I don't know what happened or where we went wrong. I'll check back in the morning if you post any other info.
    Hope it works out.

  • Address Book empty iCloud is empty too?

    MBP 2.66GHZ i7 OS 10.7.3 I had allot of duplicates and incomplete address cards after moving to iCloud so I decided to start over. On my MBP I did a back up of all contacts then proceeded to clean it up once I was done I did another back up and called it contacts_clean.abbu I selected all my contacts and deleted them in Address Book (AB) went into AB preferences and deleted all other accounts including iCloud account all that was left is "On My Mac" in "General" tab I changed "Default Account" to "On My Mac" Then I went to System Preferences I have both "Mobil Me" and "iCloud" so I read that you have to turn "Mobile Me" off so I signed out of it and went into "iCloud" and checked everything in the window. I logged into iCloud using Safari 5.1.5 clicked AB there selected all the contacts and deleted them. I selected the preference button and clicked on the import vCard option I chose the contacts_clean.abbu to import. It failed with an alert that said the vCard does not meet requirments with an option to find out what those requirments are. Apparently there is a limit to how many cards you can have and file size etc. nothing about contacts_clean.abbu met those requirments except for the fact that it was 2mb over the required limit. So I went back to my MBP and before I created an iCloud account in AB I imported contacts_clean.abbu I got a dialouge saying if I wanted to replace contacts even then there it was completely empty I clicked yes. For a second the contacts show up then they are gone and an iCloud account is created. So this time I figure I'll import but make iCloud my default account again same thing as befor with the exception that the iCloud account was not created. I thought this could be a cache thing so I flushed cache using Cache cleaner and rebooted repeated above this time the contacts where there I thought great I'm good then I noticed that iCloud began syncing it wiped everything out. I figured it's pulling from the iCloud that now has nothing in it and replacing it with nothing on my MBP. I did some research and did above flushed cache rebooted but this time I had no internet connection (Turned off WiFi/Unplugged ethernet) I launch AB on MBP and import contacts_clean.abbu into iCloud account contacts show up great there perfectly not problem. But I know the second I get on the interent and it sync's it will be gone and I will have to flush cash and start all over again. How can I get AB to retain contacts and upload to iCloud after that I want to blaze my iPhone and start from scratch. If I can get a clean version on iCloud I start over again no problem but right now I have a bloated version of contacts on my iPhone a clean version on my MBP and nothing in iCloud can anyone help me please.

    Contact with iCloud because we can't recover them

  • How can I delete ALL of my Address Book entries and start fresh?

    Yes. I know that sounds extreme, but……
    I use Outlook on a PC at my office, and I have an sbcglobal/Yahoo mail account. I look upon my office Outlook as my ultimate contacts list (over 1,100 entries) and my calendar.
    I use the sbc supplied free Intellisync software to sync all of my calendar and contacts from my office PC into sbc/Yahoo. That way I actually get e-mail reminders of appointments, etc. in addition to my Outlook notifications. It is actually pretty nifty.
    I have also successfully signed-on to my Yahoo account at home on my MAC and exported all of my contacts from Yahoo (which had been populated by the PC Outlook listings via Intellisync) onto my desktop and then imported them into Address Book. But I did that some time ago and now my Outlook listings have been updated rather substantially. I would like to able to do a complete re-install of the new and improved contacts from the Yahoo repository.
    Again - I certainly do not want to delete the Address Book app itself – I just want to start with a clean slate so there are no conflicts or duplicate entries (which in fact is seemingly a bug in the Yahoo/Intellisync. Is there a way to completely wipe clean all of my Address Book entries?
    Thanks
    Theo
    G4 (FW800) Mirrored doors Mac OS X (10.4.8) Dual 1.42GHz; 1.5GB DDR SDRAM; 20" HD Cinema Display; iSight;

    Hello Allan -
    Your help on a previous post was great re: my wanting to know how to delete the Address Book contents so I can re-import an updated list form my office Outlook, via my yahho/sbcglobal import.
    Well - here is an interesting quandary:
    I have successfully exported my yahoo address book/contacts as a .vcf file Yet - once I have expunged the prior Address Book data and want to now import the NEW Yahoo data to rebuild the database it only takes (enters) the phone numbers and does NOT import ANY of the address information. I am positive I did this once since our original exchange and everything transferred just fine, but now….?!
    What I cannot determine is where the fault may be: does the export NOT include the addresses (in which case I am doing something fundamentally stupid wit the export) or the vcf cards are complete, but Address Book is not “seeing” anything other than the phone #s and e-mail addresses.
    Any thoughts?
    Dazed and confused
    Theo

  • Can I share my address book with other user profiles on my computer?

    My wife and I both logon to our iMac with different user accounts. However, we know all the same people and would like to share the contents of the Address Book. How do we go about this so that if I add a person to the address book, that my wife will see it when she gets on with her account?
    Thanks.

    I realize yours was a suggestion to investigate & not a recommendation, but I wanted to point out some of the method's potential problems in case it was taken as the latter.
    Should anyone decide to take the safer option of sharing vCards manually, they can make the procedure easier by creating a shared folder in Users/Shared & an alias of it in some convenient location like the desktop. Then, after creating new contacts they want to share, they need only drag them from the name list into the alias. The other account holder(s) then can drag them from that common folder into their own Address Book.
    A variation of this idea is to create individual folders in each ~/Public/ folder (changing permissions as appropriate), or to use the Drop Box folder to make the vCard available to other user(s). This would reduce the confusion between "incoming" & "outgoing" vCards. I haven't tried it, but it might also be possible to automate the importing or at least notification for the receiving user with folder action scripts.

  • HT2513 Had to import Birthdays from yahoo calendar. Is there any way to move them to the iCal Birthdays calendar without manually inputing them each into Address Book?

    I used to use Yahoo Calendar to manage my birthdays and notifications of them. Yahoo screwed with something, so now I no longer get birthday notification texts to my cell. Now, I've imported my Yahoo Calendar dates in to iCal. iCal has a Birthdays "subscription" calendar which only shows birthdays entered into the Address Book. I do not have any birthdays entered into Address Book. Is there any way to select birthday entries from my other calendars and move them to the birthdays tab, or must I manually enter over 200 birthdays into Address Book?
    While I'm here, is there any way to highlight specific calendar entries and move them to a "new calendar"?
    THanks in advance for any and all help.
    -BKTru

    looks like this is not yet an option via yahoo/sbc

Maybe you are looking for

  • Mapping of Java object to ABAP

    Hey Guys, i am facing the following problem. in abap i get a table from a function back. i am copying these values to my outboundcontainer. in java i map them to an array of beans, work with them... now i want to store them in my database in the back

  • SSF configuration for external Smartcard Readers

    Hello colleagues, I 'm working at a customer who is implementing a SAP project (R/3 4.6C SR2), in which is involved the goverment. The goverment is forcing to the customer to implement digital signature in some steps of his business process, one of t

  • Organizing With An External Harddrive

    I enjoy making iDVD movies etc., but found my Apple notebook running out of hard drive space. An Apple salesperson suggested I transfer my photos to an external hard drive, and then "re-import" only the photos I wanted to use in creating an iDVD. I s

  • How do I remove Norton Antivirus *after* I have installed Lion?

    How do I remove Norton Antivirus *after* I have installed Lion? The Norton uninstaller is a PPC native app and Lion won't run it. Thanks.

  • HT3382 Can I use an all in one PC as monitor of my Mac Mini?

    I Have a HP all in one with Windows 7 With a touch sccreen.  I would like to use it as monitor of my mac mini.  I do not care for the Windows 7.  My PC does not have any display port.  Only has usb 2.0 and ethr]ernet port. Right now I am uisng an all