Adobe 23101335 - Photoshop - PC Manual page 61

Scripting guide
Hide thumbs Also See for 23101335 - Photoshop - PC:
Table of Contents

Advertisement

3.9.1 Setting the Active layer
Before attempting to manipulate a layer you must first select it. You can do this by setting the
current layer (ActiveLayer/activeLayer) to the one you want to manipulate.
AS:
set current layer of current document to layer "Layer 1" of ¬
VB:
docRef.ActiveLayer = docRef.Layers("Layer 1")
JS:
docRef.activeLayer = docRef.layers["Layer 1"];
3.9.2 Layer sets
Existing layers can be moved into layer sets. The following examples show how to create a
layer set, duplicate an existing layer, and move the duplicate layer into the layer set.
AS:
set current document to document "My Document"
set layerSetRef to make new layer set at end of current document
set newLayer to duplicate layer "Layer 1" of current document¬
move newLayer to end of layerSetRef
In AppleScript, you can also duplicate a layer directly into the destination layer set.
set current document to document "My Document"
set layerSetRef to make new layer set at end of current document
duplicate layer "Layer 1" of current document to end of layerSetRef
Photoshop 7.0 Scripting Guide
current document
to end of current document
Scripting Photoshop
Layer objects
3
61

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents