Copy link to clipboard
Copied
I'm sure this is easy but I'm not getting something right. I want to select a "Point" type text object in Javascript. How do I do that? Here's what one thing I've tried. I get the message "undefined is not an object".
var myDoc = app.activeDocument;
myDoc.TextFrameItems.getByName ("CoordinatesText").selected = true;
1 Correct answer
Hi Ray, the Reference is incorrect, it should be textFrames
myDoc.textFrames.getByName ("CoordinatesText").selected = true;
Explore related tutorials & articles
Copy link to clipboard
Copied
Hi Ray, the Reference is incorrect, it should be textFrames
myDoc.textFrames.getByName ("CoordinatesText").selected = true;
Copy link to clipboard
Copied
That did it. Thanks so much, Carlos!
Copy link to clipboard
Copied
rcraighead schrieb
… select a "Point" type text object …
only for the sake of completeness
var myDoc = app.activeDocument;
var aTF = myDoc.textFrames.getByName ("CoordinatesText");
if (aTF.kind == "TextType.POINTTEXT") {
aTF.selected = true;
}
Have fun

