The parent character *is* the parent!
=> [object Character]
Thanks Dirk - you saved me a lot of aggrevation.
Because I'm using a findGrep I can't use item() with the parentTextFrames returned from the find.
Instead I grabbed the textFrame id and access the textFrame via itemByID. I'd love to know if there is anyother way to do this. Seems rather twisted.
for(j=0; found_items.length > j; j++)
var anchorID = found_items[j].parentTextFrames.id;
linkChar = app.activeDocument.textFrames.itemByID (anchorID).parent.contents.charCodeAt(0);
Err...are you aware that
parentTextFrames is the same asparentTextFrames.item(0)?
(also, you realize that, in your snippet, everything is a global variable except for anchorID?).
Can't you just write
var linkChar = found_items[j].parentTextFrames.parent.contents.charCodeAt(0);