Photoshop CS2
Adobe Photoshop CS2 Scripting Guide
Scripting Photoshop CS2 41
JS
// Create 2 documents
var docRef = app.documents.add( 4, 4)
var otherDocRef = app.documents.add (4,6)
//make docRef the active document
app
.
activeDocument = docRef
//here you would include command statements
//that perform actions on the active document. Then, you could
//make a different document the active document
//use the activeDocument property of the Application object to
//bring otherDocRef front-most as the new active document
app
.
activeDocument = otherDocRef
Setting the Active Layer
The following examples demonstrate how to use the
current layer (ActiveLayer/activeLayer)
property of the
Document
object to set the active layer.
AS
set current layer of current document to layer “Layer 1” of current document
VBS
docRef.ActiveLayer = docRef.Layers("Layer 1")
Look up the
ActiveLayer
property in the Properties table of the
Document
object in the “Interface”
chapter of the
Adobe Photoshop CS2 Visual Basic Scripting Reference
.
JS
docRef.activeLayer = docRef.layers["Layer 1"]
Look up the
activeLayer
property in the Properties table of the
Document
object in the “Interface”
chapter of the
Adobe Photoshop CS2 Scripting Guide
.
Setting the Active Channels
More than one channel can be active at a time.
AS
Set the active channels to the first and third channel using a channel array:
set current channels of current document to ¬
{ channel 1 of current document, channel 3 of current document }
Alternatively, select all component channels using the
component channels
property of the
Document
object.
set current channels of current document to component channels ¬
of current document
VBS
Set the active channels to the first and third channel using a channel array:
Dim theChannels
theChannels = Array(docRef.Channels(0), docRef.Channels(2))
Содержание PHOTOSHOP CS 2.0 - SCRIPTING GUIDE
Страница 1: ...bbc Adobe Photoshop cs 2 Scripting Guide ...