Last active
January 6, 2021 20:36
-
-
Save mrprompt/4108538 to your computer and use it in GitHub Desktop.
Organiza a agenda de contatos do MacBook eliminando os contatos que não possuem um número de telefone.
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" | |
activate | |
## caso queria que atualize somente os selecionados | |
#set lista to selection | |
## selecine todos os contatos | |
set lista to people | |
## percorro cada contato e removo os que não possuem um telefone | |
repeat with contato in lista | |
if (number of phones of contato = 0) then | |
delete contato | |
end if | |
end repeat | |
save | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment