Adobe 23101764 Scripting Guide - Page 101
Cut, 17.4 Paste
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 101 highlights
Scripting Photoshop 3 Clipboard interaction 3.17.3 Cut The Cut command operates on both art layers and selections, so you can cut an entire art layer or only the selection of a visible layer. The Cut method follows the same rules as the copy command. AS: activate cut selection of current layer of current document VB: docRef.Selection.Cut JS: docRef.selection.cut(); 3.17.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(); Photoshop CS Scripting Guide 97