Question
Scripting - Set selection to layer mask
I'm trying to set the selected area of a group to the layer mask, then paste and image into it.
I have it selecting the group and pasting, but not sure how to make it set the selection. At the moment it pastes to the middle of the document.
If i were doing it manually, i'd command+click the layer mask thumbnail
// Layers
var layers = app.activeDocument.layers;
var layerName = "Card " + i;
var myLayer = layers[layerName];
app.activeDocument.activeLayer = myLayer;
// Selection
app.documents[0].paste();
I could define the locations manually but then would need to do it for each layer, and there are over 20 layers
