Adobe 23101335 - Photoshop - PC Manual page 83

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

Advertisement

3.16.4 Paste
The paste command can be used on any open document, and operates on the current
document. You must make the paste command's target document the current document before
using the command. A new layer is created by the paste command, and a reference to it is
returned. If there is no selection in the target document, the contents of the clipboard are
pasted into the geometric center of the document.
Here's how to paste into a document named "Doc2":
AS:
activate
set current document to document "Doc2"
set newLayerRef to paste
In Visual Basic and JavaScript the paste command is defined on the Document object.
VB:
appRef.ActiveDocument = appRef.Documents("Doc2")
Set newLayerRef = docRef.Paste
JS:
activeDocument = documents["Doc2"];
var newLayerRef = docRef.paste();
3.16.5 Paste into command
The paste into command allows you to paste the contents of the clipboard into the selection in
a document. The destination selection border is then converted into a layer mask. As for the
paste command, you must make the paste command's target document the current document
before using the command.
AS:
activate
set newLayerRef to paste with clipping to selection
VB:
Set newLayerRef = docRef.Paste (True)
JS:
newLayerRef = docRef.paste( true );
Photoshop 7.0 Scripting Guide
Scripting Photoshop
Clipboard interaction
3
83

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents