Brahm's AppleScripts

Mac OS X 10.3's Address Book (version 3.1) has added the ability to add a number of new features including instant messaging ID's for the Yahoo!, ICQ, Jabber and MSN networks as well as printing nice-looking contact lists. I've put together the AppleScripts below to take advantage of these new features. After installing them, you need to restart Address Book for the changes to take effect.


Address Book Scripts

These scripts can be run anywhere, but they are most useful if they are placed in ~/Library/Scripts/Address Book Scripts/ for your own use or /Library/Scripts/Address Book Scripts/ if you want everyone on the machine to have access to them. Placing the scripts in one of these locations will make the scripts available from the Address Book's scripting menu in the menu bar.

Set Yahoo! Messenger IDs

This script scans each Address Book record for yahoo.com e-mail addresses and for each address found creates a new Yahoo! Messenger entry within the record with the same label as the e-mail address (e.g. if the e-mail address has a "work" label, the Yahoo! Messenger entry will be given the "work" label). See the script below to put these newly set values to use.

Set Yahoo! Messenger IDs.app

Prepare Printing Group

The Address Book in Mac OS X 10.3 allows a user to print out a list of address book entries and choose the attributes that are included in the print out. However, not all entries will necessarily have any of the attributes choosen, which leads to useless entries in the print-out and therefore is less than ideal.

This script allows the user to create a group that is populated with entries that contain one or more of the attributes that they intend to choose when printing. For example, if the user wants to print out only entries with (at least) an e-mail address and phone number, she would:

  1. Run the script.
  2. Choose the "Phone" and "Email" items from the list.
  3. Assign a name to the group that will hold the results.
  4. Optionally assign a name to a group to put all the entries that did not match the attribute selection. This is useful in determining entries for which the user might want to track down missing information.
  5. Possibly quit the Address Book when the script is finished (if the Group list is not updated dynamically).
  6. Restart the Address Book (if necessary).
  7. Select the new group.
  8. Select all entries in the group.
  9. Choose the "Print..." menu item.
  10. Choose the "Phone" and "Email" items from the Print dialog's attribute list.

Prepare Printing Group.app

Copy Contact Information

This script will allow you to copy information from one entry into another. This is useful if you have one entry for multiple people with the same information (i.e. spouses or roommates with the same phone number or address), but then you end up splitting the entry into two when you want to add specific information for one of the people (i.e. personal cell phone number or e-mail address). After installing the script, select two entries by command-clicking, then run the script from the Script menu.

Copy Contact Information.scpt


Address Book Plug-Ins

The following AppleScripts fit into Address Book's Plug-In architecture introduced in Mac OS X 10.3. They allow you to click on an instant messenger ID label in the Address Book to launch the appropriate application. They are most effective if you have your instant messenger client configured to automatically log you in upon launch. They should be placed in ~/Library/Address Book Plug-Ins/ for your own use or /Library/Address Book Plug-Ins/ if you want everyone on the machine to be able to use them.

Yahoo! Messenger

This script will launch Yahoo! Messenger when you move the cursor over a Yahoo! Messenger ID and click on the Yahoo! Messenger pop-up menu. Due to the lack of AppleScript support in Yahoo! Messenger, there is currently no way to determine if the user is online or to create a new instant message to the user.

Launch Yahoo! Messenger.scpt

ICQ

This script will launch ICQ 3.4 when you move the cursor over an ICQ ID and click on the ICQ pop-up menu. You will need to modify the script to match the application's name if you have a different version of ICQ. If the user is logged on, a new instant message will be created and addressed to them. If the user is not logged on, a new instant message will be created but it will not be addressed to anyone.

Launch ICQ 3.4.scpt