Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: "No Such Element". Intro to scripting.

$
0
0

It can take a while to learn what 'something.somethingElse.somethingDifferent' means.But it really isn't that hard and I think you will find it easy to learn with a little practice.

 

So in a Photoshop script;

 

app means the Photoshop object( the program itself )

 

app.documents means the documents property of app. That contains a collection of document object.

 

app.documents.add() means the add method of documents. It is used to create a new document( add to the documents collection ). Note add does except arguments so you can control how the document is created.

 

artLayers is a docment object property that contains a collection of artLayer in the document. Note that a document object will also have  layers and layerSets properties. layerSets is a collection of  layerSet objects and layers is a collection that has both artLayer and layerSets objects.

 

artLayer.add() adds an artLayer. It doesn't have any arguments so you can't set the type of layer when creating.

 

artLayer.kind is a property for the layer's type. Using the Object Model you can only set the kind property to text and then only with an empty layer.

 

artLayer.textItem is property only a text layer will have. There you can set the contents, font, color, position, etc for the text layer.


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>