Scripting: How to Fill on a lock transparency without dialog box
Hello,
My script works as expected, but the problem is when it fills on a locked transparency, the dialog box pops up, which is not what I want.
I see some very old answers that say to use AM code, but i can't understand how it works and I don't know how to adapt it to the code I've written.
function reColorGroup (tag, colorObject, styleString) {
var doc = app.activeDocument;
var group = doc.layerSets.getByName(tag+"-"+styleString);
var color = new SolidColor();
doc.activeLayer = group.layers.getByName("BASE");
doc.activeLayer.visible = true;
color.rgb.hexValue = colorObject.color;
doc.selection.fill(color);
}Here's the two leads I found:
https://stackoverflow.com/questions/23699937/photoshop-opens-dialog-box-when-trying-to-fill-a-layer-with-transparent-pixels-l
I appreciate any help. Thank you.
