mercredi 24 décembre 2014

Script Editor crashing when running Applescript


I need to extract the phone number of all the contacts in a particular group and for that I am using the following code -



on run {input, parameters}
tell application "Contacts"
set thePeople to every person
repeat with i from 1 to number of items in thePeople
set this_person to item i of thePeople
set inGroup to name of group of this_person
if inGroup is "Technology" then
set x to properties of phones of this_person
end if
end repeat
end tell
end run


But whenever I run the code, the script editor crashes and asks me to reopen it even though I have only one contact in that group. What's happening here?





Aucun commentaire:

Enregistrer un commentaire