Adobe 23101335 Scripting Guide - Page 65
Setting the contents of the text item, textLayerRef.TextItem.Contents = Hello
UPC - 718659152833
View all Adobe 23101335 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 65 highlights
Scripting Photoshop 3 Text item object JS: docRef.artLayers["my text"].textItem.justification = Justification.RIGHT; IMPORTANT: The text item object has a kind property, which can be set to either point text (psPointText/TextType.POINTTEXT) or paragraph text (psParagraphText/TextType.PARAGRAPHTEXT). When a new text item is created, its kind property is automatically set to point text. The text item properties height, width and leading are only valid when the text item's kind property is set to paragraph text. 3.10.1 Setting the contents of the text item To set the contents of a text item in AppleScript you would write: set contents of text item of art layer "Layer 1" of ¬ current document to "Hello" If you use a text item object reference to set the contents you will need to write: set contents of contents of textItemRef to "Hello" The second "contents of" is needed because "contents" is a keyword which tells AppleScript to operate on the contents of the variable, rather than on the object to which it may refer. This means that AppleScript sees the above line as: set text item of art layer 1 of document "Untitled-1" ¬ to "Hello" To set the contents using references in VB and JS, write the following: VB: textLayerRef.TextItem.Contents = "Hello" JS: textLayerRef.textItem.contents = "Hello"; Photoshop 7.0 Scripting Guide 65