Adobe Photoshop CS3 Scripting Guide
Set newDocRef = appRef.Documents.Add(8, 6, 72, "New Doc")
newDocRef.Paste
JS
//make firstDocument the active document
var docRef = app.activeDocument
docRef.artLayers["Background"].copy()
var newDocRef = app.documents.add(8, 6, 72, "New Doc")
newDocRef.paste()
Using the Copy Merged Command/Method
You can also perform a merged copy to copy all visible layers in the selected area. In AppleScript, you use
the
copy merged
value of
True/true
AS
Note:
On Mac OS, Photoshop CS3 must be the front-most application when executing these commands.
You must use the
commands.
set docRef to make new document
make new art layer of docRef
select all of docRef
copy merged selection of docRef
VBS
docRef.Selection.Copy True
Look up the
Basic Scripting Reference, or in the Visual Basic Object Browser
JS
docRef.selection.copy(true)
Look up the
JavaScript Scripting Reference, or in the ExtendScript Object Model Viewer.
Working with Units
Photoshop CS3 provides two rulers for documents. Using properties on the
(
Preferences/Preferences
rulers are:
A graphics ruler used for most graphical layout measurements or operations on a document where
●
height, width, or position are specified.
You set measurement unit types for the graphics ruler using the
(RulerUnits/rulerUnits)
command. For VBScript and JavaScript, you use the
for the optional
command to activate the application before executing any clipboard
activate
method for the
Copy
ArtLayer
method for the
copy()
) object, you can set the measurement units for the rulers in your script. The
property.
Photoshop CS3
parameter.
merge
and
Selection
and
ArtLayer
Selection
Scripting Photoshop CS3
command, passing in a
Copy/copy
objects in the Adobe Photoshop CS3 Visual
objects in the Adobe Photoshop CS3
settings-object
ruler units
55
Need help?
Do you have a question about the 23102480 - Photoshop CS3 - PC and is the answer not in the manual?