Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Photoshop opens dialog box when trying to fill a layer with transparent pixels locked

$
0
0

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);

Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>