This script should set the layer to lock transparent pixels, and then fill the layer with a color. It does that, except when it gets to the fill stage, it opens the fill dialog box, and you have to hit okay.
If you omit the transparent pixel line, it runs as expected, no dialog box.
Is there a way to suppress the box? Or am I doing something wrong that's causing the box to open?
#target photoshop app.bringToFront(); doc = app.activeDocument; doc.artLayers[0].isBackgroundLayer = false; doc.artLayers[0].transparentPixelsLocked = true; app.activeDocument.selection.fill(app.foregroundColor);