tell application "Address Book" repeat with thisContact in people repeat with thisEmail in email of thisContact if value of thisEmail contains "@yahoo" then set found to false -- do they already have the appropriate Jabber handle? repeat with handle in Jabber handles of thisContact if value of handle contains "yahoo.jabber.org.uk" then set found to true exit repeat end if end repeat if not found then -- create new jabber handle -- extract name before "@" set delim to AppleScript's text item delimiters set AppleScript's text item delimiters to "@" set namePart to first text item in (value of thisEmail as string) set AppleScript's text item delimiters to delim tell thisContact make new Jabber handle at end of Jabber handles with properties {label:label of thisEmail as text, value:namePart & "@yahoo.jabber.org.uk"} end tell end if end if end repeat end repeat end tell