Ich habe ein Skript verwendet, das in Mountain Lion nicht mehr funktioniert, obwohl ich die Wörter "Adressbuch" in "Kontakte" geändert habe.
Wenn Sie alle Kontakte auswählen und dann das Skript verwenden, werden alle Kontakte gefunden, die sich nicht in einer Gruppe für Sie befinden. Das kurze Skript ist unter MacOSX-Hinweise verfügbar:
http://hints.macworld.com/article.php?story=20051126084705352
Kann das jemand ändern, damit es wieder funktioniert? Vielen Dank im Voraus.
Probieren Sie es aus, ich habe eine riesige Kontaktliste, also würde es eine Milliarde Jahre dauern, sie vollständig auf meiner zu testen. Aber die ersten Tests funktionieren
Diese Art von Skript ist wirklich nur für kleine Listen praktisch, da der Overhead mit all den Wiederholungen exponentiell ist, je größer sie werden.
property orphan : "Orphans"
tell application "Contacts"
if not (exists group orphan) then
(*Create the new group*)
make new group at the end of groups with properties {name:orphan}
end if
--set thePeople to first person whose first name is "TEST"
(*get all entries*)
set thePeople to every person
(*iterate through the entries*)
repeat with i from 1 to number of items in thePeople
(*get the entry*)
set this_person to item i of thePeople
(*get the entries group list *)
set inGroup to name of group of this_person
if inGroup is {} then
(* entry is not in any group*)
add this_person to group orphan
save
else if inGroup contains "Orphans" and inGroup is not equal to {"Orphans"} then
(*if entry is already in a group/s then check it is not also in¬
Orphans or only in orphans*)
(* entry is in orphans and another group so remove it from orphans*)
remove this_person from group orphan
save
end if
end repeat
save
end tell
Emaven
Markhunte