Copy link to clipboard
Copied
I am adding text to my document with the following parameters setup...
var attachmentTextFrame = doc.textFrames.add();
// Fill color
attachmentTextFrame.textRange.characterAttributes.fillColor = newRGBColor;
// Font size
attachmentTextFrame.textRange.characterAttributes.size = 14;
// Font
attachmentTextFrame.textRange.characterAttributes.textFont = app.textFonts.getByName("Arial-BoldMT");
// Make all text uppercase
attachmentTextFrame.contents = attachmentDescription.text.toUpperCase();
// Placement of the textFrame
attachmentTextFrame.position = new Point(useThisX, useThisY);
Is there a way to make this textFrame be created on a layer called "Single Line"?
attachmentTextFrame.moveToBeginning(app.activeDocument.layers["Single Line"]);
Copy link to clipboard
Copied
attachmentTextFrame.moveToBeginning(app.activeDocument.layers["Single Line"]);
Copy link to clipboard
Copied
well that was quick and easy. lol. thank you williamadowling!
Copy link to clipboard
Copied
You got it, brother.
Copy link to clipboard
Copied
williamadowling schrieb
attachmentTextFrame.moveToBeginning(app.activeDocument.layers["Single Line"]);
Only one question: why moving after creation instead of creating directly at destination layer?
var attachmentTextFrame = doc.layers["Single Line"].textFrames.add();
Copy link to clipboard
Copied
Good point. I will update the script to do that. Much appreciated! I learn so much from everyone on this forum!