Newbie Script Error - Help?
Newbie Script Error - Help?
- Subject: Newbie Script Error - Help?
- From: Robert Damm <email@hidden>
- Date: Sat, 19 Apr 2003 00:05:48 +1000
I am starting to write a synchronisation applescript for address book to
entourage. This is the beginning of it...and it fails with
"Address book got error: Can't continue find_contact"
Help?
on find_contact(first_name, last_name)
tell application "Microsoft Entourage" to return count of (contacts
whose first name is first_name and last name is last_name)
end find_contact
on create_contact(first_name, last_name)
tell application "Microsoft Entourage"
set new_contact to make new contact
set first name of new_contact to first_name
set last name of new_contact to last_name
end tell
end create_contact
tell application "Address Book"
repeat with my_person in people
set first_name to first name of my_person as string
set last_name to last name of my_person as string
if find_contact(first_name, last_name) is 0 then
create_contact(first_name, last_name)
end if
end repeat
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.