10.4: Fix Dashboard's Address Book Startup Behavior

May 12, '05 09:51:00AM

Contributed by: jmil

Tiger only hintDashboard's Address Book widget defaults to showing the first vCard in your address book. If you would rather have it default to your vCard, do the following:

  1. Copy /Library/Widgets/Address Book.wdgt to your user account's Library/Widgets/ folder (renaming is optional).

  2. Control-click on the newly copied widget, and choose Show Package Contents from the pop-up menu. Find the "AddressBook.js" file in the newly opened window, and open this in a text editor (e.g. TextEdit or BBEdit).

  3. Change the line:
    var savedSearchString = "";
    to this:
    var savedSearchString = "Your Name";
    Replace Your Name with, well, your name.

  4. Save the AddressBook.js file and quit the Editor.
Now, when you open Dashboard and drag out a new Address Book widget, the widget will first search the Address Book for Your Name, and display matching cards. This should default to your card. Note that this could be applied to more interesting default settings, such as using Co-workers as the search string, which would bring up a list of all of your co-workers for quick reference (if Apple would allow searching based on Address Book Group).

Anyone know how to write a javascript that can parse out *your* card so that the name doesn't have to be hard-coded like this? Alternatively, could this functionality be extracted to a configuration pane of the Address Book widget?

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050503175139121