I love Skype, but it is very stupid when it comes to your Address Book phone numbers. Because Skype needs the country prefix (“1” in the USA), I couldn’t use any of my Address Book contacts to dial out. And Skype’s number pad won’t let you predial the 1 and then add a contact number unless you type the whole thing manually.
Since I’ve always put “USA” as the country in my Address Book entries, I wrote a quick script to add a “1” to all my phone numbers in the US.
tell application "Address Book" set theContacts to every person whose (country of address 1) is "USA" repeat with aPerson in theContacts repeat with aPhone in phones of aPerson set theNumber to value of aPhone if first character of (theNumber as text) is not "1" then set value of aPhone to "1" & (theNumber as text) end repeat end repeat end tell