some address book scripts
some address book scripts
- Subject: some address book scripts
- From: Michelle Steiner <email@hidden>
- Date: Fri, 6 Apr 2007 16:38:17 -0700
Here are the final versions of the scripts I was writing for the Address Book:
To create a VCF file of all contacts:
set daName to "vcards.vcf" tell application "Address Book" to set vcardData to vcard of the people tell application "Finder" make new file with properties {name:daName} at (choose folder) set destination to the result as alias end tell set fileRef to open for access destination with write permission set eof fileRef to 0 write (vcardData as text) to fileRef close access fileRef
To add people to groups:
tell application "Address Book" set the peeps to (choose from list (get the name of the people) with multiple selections allowed) set the grps to (choose from list (get the name of the groups) with multiple selections allowed) repeat with this_peep in the peeps repeat with this_group in the grps add person this_peep to group this_group end repeat end repeat save addressbook end tell
Is there any way to eliminate either or both of the loops in the second script?
-- Michelle
-- America: A nation of people avoiding moderation like it's the plague. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden