So the question is, in Applescript when I'm looking at a contact object, how can I determine if that contact is currently on my actual yahoo contact list, as opposed to just lurking in the plist?
Here is some code I have so far:
Code: Select all
tell application "Adium"
repeat with eachAccount in every account of service "Yahoo!"
set allContacts to get every contact of eachAccount
repeat with eachContact in allContacts
set dName to the display name of eachContact
set uName to the name of eachContact
if (exists contact uName) then
set existsStatus to "TRUE"
else
set existsStatus to "FALSE"
end if
if (blocked of eachContact) then
set blockedStatus to "TRUE"
else
set blockedStatus to "FALSE"
end if
-- NEEDED HERE HOW TO DETERMINE ACTIVE CONTACT
-- Display a confirmation box for deleting the contact permanently
set question to display dialog "User=" & dName & " " & uName & "
Exists=" & existsStatus & "
Blocked=" & blockedStatus & "
Do you want to delete?" buttons {"Yes", "No"} default button 2
set answer to button returned of question
if answer is equal to "Yes" then
-- delete it
end if
end repeat
end repeat
end tell