Created
March 7, 2013 00:40
-
-
Save kristarella/5104539 to your computer and use it in GitHub Desktop.
Somewhere along the way in syncing and merging duplicate contacts etc. I ended up with boat loads of Google Profile links as people's home page in my contacts. Most of those people don't even use Google+, so it seemed a bit dumb. This script easily vamoosed them!
Don't forget to change the conditional contains "google.com" if you want to remove …
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 "Address Book" | |
set output to "" | |
repeat with this_person in every person | |
set numurl to count (urls of this_person) | |
if numurl > 0 then | |
set theurls to properties of urls of this_person | |
repeat with this_url in theurls | |
-- Capturing the urls and a new line | |
set output to output & (value of this_url as string) & return | |
if value of this_url contains "google.com" then | |
set value of url of this_person to "" | |
end if | |
end repeat | |
end if | |
end repeat | |
display dialog output | |
save | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment