1 Reply Latest reply on Sep 5, 2016 12:24 AM by jaank

    Preventing fill dialog box with scripting

    jaank Level 1

      Hi.

       

      I have an automation script that fills certain pixels on a layer. Everything works, but sometimes it will display the fill dialog box for settings with some (not all) png files. I need to get rid of the dialog box. Is there a possibility to do this with scripting ? for example a default option?

       

      Thanks!

       

      Photoshop CC 2015.5

      Windows 8.1

        • 1. Re: Preventing fill dialog box with scripting
          jaank Level 1

          Okay, look's like I solved the problem.

           

          The dialog box showed up on the png files, that have Image->Mode->Indexed Color.

           

          So before the filling, I added the following script, that will ensure the Image Mode will be RGB:

           

           

           

          var idCnvM = charIDToTypeID( "CnvM" );
          var desc36 = new ActionDescriptor();
          var idT = charIDToTypeID( "T  " );
          var idRGBM = charIDToTypeID( "RGBM" );
          desc36.putClass( idT, idRGBM );
          executeAction( idCnvM, desc36, DialogModes.NO );