Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onderceylan/558f9341513d2fa9146669d23d37443e to your computer and use it in GitHub Desktop.
Save onderceylan/558f9341513d2fa9146669d23d37443e to your computer and use it in GitHub Desktop.
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

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