Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual page 45

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
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
property of the
AS
set current layer of current document to layer "Layer 1" of current document
VBS
docRef.ActiveLayer = docRef.Layers("Layer 1")
Look up the
chapter of the Adobe Photoshop CS2 Visual Basic Scripting Reference.
JS
docRef.activeLayer = docRef.layers["Layer 1"]
Look up the
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
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))
object to set the active layer.
Document
property in the Properties table of the
ActiveLayer
property in the Properties table of the
activeLayer
Photoshop CS2
current layer (ActiveLayer/activeLayer)
component channels
Scripting Photoshop CS2
object in the "Interface"
Document
object in the "Interface"
Document
property of the
41
Document

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs2

Table of Contents