Research Contacts app for people with e-mail does not (applescript)


I've been tryingg to run a script that I found on the internet and it does not work - simple search

tell application "Contacts"
  --look for a person who has this email address (see note at top about case)
  set foundPerson to (first person where its value of email contains theEmail)
  on error
  my Logger(1, "Scan Address Book: No entry for " & theEmail)
  return {}
  end try


(sory for the post above, I don't no how to change...)

In any case, the script goes like this:

property theEmail: "[email protected]."

Tell application "Contacts".


the foundPerson value (first person when his value of email contains theEmail)

in case of error

My recorder (1, "address book Scan: no access to the"& theEmail ")

return {}

try to end

↑ This is not any email (he catches error), although in the address book, there is an entry with [email protected]...

I tried a lot of combinations, what am I doing wrong here?

Tags: Mac OS & System Software

Similar Questions

Maybe you are looking for