Activate Layer by Name From Clipboard
this is just a quick follow-up to the 'Move Layer To Cursor' topic- I'm trying to activate a particular layer, and the particular layer's name will be in the clipboard.
So for example, let's say the active layer is "Layer 1"
and the clipboard contains "Layer 5"
So I want to be able to switch over to Layer 5. The reason for this is that the clipboard might contain different layer names at any given time. So it's not as easy as just writing a script to switch to Layer 5. I need to switch to whatever layer is in the clipboard at any given time. The reason for this is a little long-winded so I'll leave that part out for now ![]()
Here's a script which I was hoping to alter and make it work:
#target photoshop
var layerRef = app.activeDocument.layers.getByName( 'Layer1' );
app.activeDocument.activeLayer = layerRef;
but I was hoping to change it to something along these lines:
#target photoshop
var layerRef = app.activeDocument.layers.getByName( 'WHATEVER IS IN THE CLIPBOARD' );
app.activeDocument.activeLayer = layerRef;
