Adobe 23102480 Scripting Guide - Page 35
Creating a Layer Set Object, The following examples show how to create
UPC - 883919080222
View all Adobe 23102480 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 35 highlights
Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Scripting Photoshop CS3 35 VBS Dim appRef Set appRef = CreateObject("Photoshop.Application") ' Create a new art layer at the beginning of the current document Dim docRef Dim layerObj Set docRef = appRef.Documents.Add() Set layerObj = appRef.ActiveDocument.ArtLayers.Add layerObj.Name = "MyBlendLayer" layerObj.BlendMode = 2 'psNormalBlend ' Select all so we can apply a fill to the selection appRef.ActiveDocument.Selection.SelectAll ' Create a color to be used with the fill command Dim colorObj Set colorObj = CreateObject("Photoshop.SolidColor") colorObj.RGB.Red = 255 colorObj.RGB.Green = 0 colorObj.RGB.Blue = 0 ' Now apply fill to the current selection appRef.ActiveDocument.Selection.Fill colorObj JS //make a new document app.documents.add() // Create a new art layer at the beginning of the current document var layerRef = app.activeDocument.artLayers.add() layerRef.name = "MyBlendLayer" layerRef.blendMode = BlendMode.NORMAL // Select all so we can apply a fill to the selection app.activeDocument.selection.selectAll // Create a color to be used with the fill command var colorRef = new solidColor colorRef.rgb.red = 255 colorRef.rgb.green = 100 colorRef.rgb.blue = 0 // Now apply fill to the current selection app.activeDocument.selection.fill(colorRef) Creating a Layer Set Object The following examples show how to create a Layer Set object after the creating the first ArtLayer object in the current document: AS tell application "Adobe Photoshop CS3" make new document with properties {name:"My Document"} make new art layer at beginning of current document make new layer set after layer 1 of current document