Copy link to clipboard
Copied
Hi, I know this topic has been covered many times before. But to clarify, here's what I'm wondering:
Copy the active layer/group to another open document in Photoshop. The simple way is to go to "Layer/Duplicate Layer..." . But this is very tedious. For starters, when you choose that method, and then select the document that you'd like to copy to via the pull-down menu, it successfully copies the layer/group to that document, but it doesn't auto-switch (activate) to the document it was just copied to. You have to hit "Ok", and then manually search through the open documents list via (Window/*choose your document*) to get there. This is a nightmare when you're trying to do this many times.
Here is what I am wondering:
Is it possible to:
a) copy the active layer/group to the clipboard/memory
b) switch to another existing document in Photoshop *via a custom menu* which shows all existing documents
c) once switched to the new existing document, paste that layer/group from the clipboard into that document
..is that possible?
At the very least, are there any scripts that anyone knows of that allows the user to switch between existing documents via a custom menu instead of going to Window/*choose your document* ?
Hi @boo radley 2013,
do you mean something like this?
...// LayerPaste2anotherDoc.jsx
// https://forums.adobe.com/thread/1496531
// regards pixxxelschubser
var aDoc = app.activeDocument;
var AllDocs = app.documents;
var actLay = aDoc.activeLayer;
if (AllDocs.length > 1) {
var itemDoc = null;
actLay.copy ();
var win = new Window("dialog","Copy the active layer");
this.windowRef = win;
win.Txt1 = win.add ("statictext", undefined, "Paste in which open document?");
win.NewList=win.add ("dropdownlist
Copy link to clipboard
Copied
That was not really a problem for me. The explanation is in my other post # 8.
And unfortunately there is no possibility more to mark a post as helpful (since the last Jive update). In my eyes that is very sad.
By the way, does c.fpaffenbichlers script works for you?
Copy link to clipboard
Copied
no, it is giving me the "var idT = charIDToTypeID( "T " );" error
I use Photoshop CS6
Copy link to clipboard
Copied
And unfortunately there is no possibility more to mark a post as helpful (since the last Jive update). In my eyes that is very sad.
Well, the last Forum update certainly has (despite some improvements) made quite a lot of stuff worse.
no, it is giving me the "var idT = charIDToTypeID( "T " );" error
It should be "T " with three spaces (and I checked, that’s the way it is in my Script and that’s the way the text in the clipboard is pasted in Indesign for example) but it gets pasted here as two spaces.
Copy link to clipboard
Copied
Hi c.pfaffenbichler,
a short feedback: Like you said, with the „third space“ your code now works well in CS3 and CS5 .
The insertion point for the selected layer (or group) is in both versions the topleft corner in the other document.
Copy link to clipboard
Copied
yes, now it works - ensured that there were '3' empty spaces instead of "2". Don't know why that happened, but it's good now. I added one line of code at the end of the c.pfaffenbichler's script, which causes Photoshop to auto-switch to the destination document after the layer/group has been copied to it. Originally, it just stayed on the current document after copying. Having 2 versions of this script is nice, because sometimes you'll want to auto-switch to the destination document that the layer was copied to it instead of having to search through all open documents and then manually switching to it - a pain, especially if you have many documents open at once. The second version of the script (c.pfaffenbichler's original script) keeps you on the current document even after the layer/group was copied to another document, and this is useful if you're copying multiple layers/groups over to another doc - it would be a pain switching back, forth, back, forth just to copy a few layers over. thanks guys
Copy link to clipboard
Copied
mark
copy. script ui
Find more inspiration, events, and resources on the new Adobe Community
Explore Now