Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AppleScript code for adding Turkish international phone prefix to every phone item in Apple Contacts
tell application "Contacts"
repeat with i from 1 to (count every person)
set phoneProperties to properties of phones of person i
repeat with j from 1 to (count of phoneProperties)
if value of item j of phoneProperties does not contain "+" then
set oldPhone to value of item j of phoneProperties
set value of item j of phones of person i to "+9" & oldPhone
end if
end repeat
end repeat
save
end tell
@onderceylan
Copy link
Author

onderceylan commented Oct 2, 2016

Keep in mind that this script will convert all non-prefixed numbers of your contacts to Turkish prefixed ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment