Address Book stops indexing after editing Notes field w/ Applescript?
Address Book stops indexing after editing Notes field w/ Applescript?
- Subject: Address Book stops indexing after editing Notes field w/ Applescript?
- From: spamstop <email@hidden>
- Date: Sun, 06 Apr 2008 20:49:05 -0700
I've been playing around with address book all week, and have run into a
wall. I suspect that the root cause is a bug in address book, but I'd
love to know if anyone else has had similiar problems.
I use Now Up To Date and Contact currently, but wanted to move over to
address book. The iSync interface doesn't move over some metadata for
contacts (NU2DAC's "Notes" fields), but NU2DAC will export those fields
to text files.
I've exported all of my contacts into text files, and imported them into
addressbook. This alone works okay, except that all of the Note fields
in address book (made up of the individual text-like Notes fields from
NU2DAC) have little paragraph marker chars rather than the newlines that
NU2DAC uses. Specifically, NU2DAC exports the Notes fields as text,
with the unsigned char 0xA6 as the line separator (paragraph marker).
My first attempt to fix this involved writing a little applescript to
replace the paragraph character with applescript's return. After
running 'save addressbook', though, addressbook stops being able to
index any entries whose notes are modified by the applescript.
Just for kicks, I restored the database, and ran an applescript that
looped through every person, and only "set note of thisperson to note of
thisperson", and then "save addressbook". Lo and behold, any contact
that had a "Note" field suddenly became un-indexable.
After playing around with Address Book's SQLite database, it seems that
using applescript to update the Note field causes the ZSTRINGFORINDEXING
string of ZCONTACTINDEX to become NULL for the modified contacts. It's
VERY possible that this is conditional on some other funky text in the
Note field (maybe that paragraph character), though it seems unlikely.
Has anyone used applescript to modify the Note property of a person
before? Can you still use Address Book to search for such contacts?
Some of the Note fields I use are pretty large, perhaps this messes with
AddressBook?
Any guidance is appreciated, at this point I'm looking at abandoning
AddressBook altogether, as it's really unacceptable to have it stop
indexing contacts that I need to find to conduct business. :-/
Thanks!
Jeremy
_______________________________________________
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