So I'm having some weird issues with deleting items from my address book using Applescripts...
I run a delete script and nothing seems to happen, so I did a little test. First I ran:
And it tells me '221'
Then I run:
And it gives no errors.
Finally I run the first script over again and it gives me 0.
I'd think that all would be well, but I open address book and it seems like the items are still there. In fact, I know they are still there. I can close Address Book and then open it again and run the count script and it gives me 221 again!
Any idea how to get these changes to stick?
I run a delete script and nothing seems to happen, so I did a little test. First I ran:
Code:
tell application "Address Book"
count (emails of people whose label is "mobile")
end tell
Then I run:
Code:
tell application "Address Book"
delete (emails of people whose label is "mobile")
end tell
Finally I run the first script over again and it gives me 0.
I'd think that all would be well, but I open address book and it seems like the items are still there. In fact, I know they are still there. I can close Address Book and then open it again and run the count script and it gives me 221 again!
Any idea how to get these changes to stick?