InsertionPoints
InsertionPoints
Section titled “InsertionPoints”app.activeDocument.textFrames[index].insertionPoints
Description
Section titled “Description”A collection of InsertionPoint objects.
Properties
Section titled “Properties”InsertionPoints.length
Section titled “InsertionPoints.length”app.activeDocument.textFrames[index].insertionPoints.length
Description
Section titled “Description”Number of elements in the collection.
Number; read-only.
InsertionPoints.parent
Section titled “InsertionPoints.parent”app.activeDocument.textFrames[index].insertionPoints.parent
Description
Section titled “Description”The object’s container.
Object; read-only.
InsertionPoints.typename
Section titled “InsertionPoints.typename”app.activeDocument.textFrames[index].insertionPoints.typename
Description
Section titled “Description”The class name of the object.
String; read-only.
Methods
Section titled “Methods”InsertionPoints.index()
Section titled “InsertionPoints.index()”app.activeDocument.textFrames[index].insertionPoints.index(itemKey)
Description
Section titled “Description”Gets an element from the collection.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
itemKey | String, Number | String or number key |
Returns
Section titled “Returns”Example
Section titled “Example”Using insertion points to add spaces
Section titled “Using insertion points to add spaces”// Creates a new document, adds text then inserts a// space between each character using insertion points
var docRef = documents.add();var textRef = docRef.textFrames.add();textRef.contents = "Wouldn't you rather be scripting?";textRef.top = 400;textRef.left = 100;textRef.textRange.characterAttributes.size = 20;
redraw();
// Add a space between each character using insertion points.var ip;for (var i = 0; i < textRef.insertionPoints.length; i += 2) { ip = textRef.insertionPoints[i]; ip.characters.add(" ");}