Domain management using the os X address book
A very simple yet powerful way to track a whole lot of data is available with proper setup on os X.
The address book in os X is actually a fairly powerful database application. Just need to develop a format to take best advantage of the capabiliteis.
The setup..
1. Create an applescript that when given an address book entry, will either locate the folder that matches that entry, or create a new folder for that entry. **NOTE--to quickly open the script editor, Apple-spacebar, type "script edi" into the spotlight search box that appears, tap "enter" when script editor is displayed as the top hit.**END NOTE
****Copy and paste the below into an os X script editor file.*****************
using terms from application "Address Book"
on action property
return "phone"
end action property
on action title for thePerson with thePhone
tell application "Address Book"
set theName to name of thePerson
end tell
return "Show folder for " & theName
end action title
on should enable action for thePerson with thePhone
return true
end should enable action
on perform action for thePerson with thePhone
tell application "Address Book"
set mySelected to selection
repeat with myPerson in mySelected
set lName to last name in myPerson
set fName to first name in myPerson
set newFolderName to lName & "_" & fName
end repeat
end tell
tell application "Finder"
activate
select Finder window 1 --a finder window must already be open
set target of Finder window 1 to folder "clients" of folder "lakedata" of folder "devel" of folder "dougb" of folder "Users" of startup disk
try
make new folder at folder "clients" of folder "lakedata" of folder "devel" of folder "dougb" of folder "Users" of startup disk with properties {name:newFolderName}
tell application "TextEdit"
activate
make new document at front with properties {text:"enter text for " & newFolderName}
set name of front window to ("untitled")
end tell
on error --file exists is hopefully the error
set target of Finder window 1 to folder newFolderName of folder "clients" of folder "lakedata" of folder "devel" of folder "dougb" of folder "Users" of startup disk
end try
end tell
return true
end perform action
end using terms from
***********************************************
2. Save that applescript file into the ~/Library/Address Book Plug-Ins folder as open-folder-phone.scpt file.
3. Notice that clicking on the type field of a phone book entry in address book displays a popup menu, and that popup menu now includes the "Show folder for xxxxxx" thanks to this script.
To use..
Any time a new domain is setup, make an entry for that domain in the address book. As a suggestion, use a <registrar>, <domain name>, registrar as last name, and domain name as first name format. That allows simplified sorting of domain names by registrar. A dummy phone number of 1111111111 is filled in as the work phone number at the time of record creation. It is also handy to set up birthday and anniversary fields with entries and alarms in ical to be sure to get the domains renewed on schedule.
When there is need to enter or read miscellaneous information that logically applies to a given domain, the folder is quickly accessed from the address book application, by clicking the phone number type entry and selecting the folder from the popup menu.
