Assuming you have a comp open with a text layer as the first layer:
var activeItem = app.project.activeItem;
var theTextLayer = activeItem.layer(1);
var textAnimGroup = theTextLayer.property("ADBE Text Properties").property("ADBE Text Animators");
var theTextAnimator = textAnimGroup.addProperty("ADBE Text Animator");
alert("added " + theTextAnimator.name);
I highly recommend you get Jeff Almasol's GimmePropPaths script as you can work out all kinds of things like this using it:
http://www.redefinery.com/ae/view.php?i ... mePropPath
For example, I added a text layer and text animator, selected the animator and got the full property path for it using GimmePropPaths:
app.project.item(2).layer("test").property("ADBE Text Properties").property("ADBE Text Animators").property("ADBE Text Animator")
This gave me the additional information I needed to write the code above. Although I was already aware that the invisible containing group for all text animators ("ADBE Text Animators") is a permanent, default property of a text layer, so only the specific animator you want needs to be added into that group.
Paul