AppleScript code for adding Turkish international phone prefix to every phone item in Apple Contacts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Keep in mind that this script will convert all non-prefixed numbers of your contacts to Turkish prefixed ones.