Highlighted

Preventing fill dialog box with scripting

Community Beginner ,
Sep 04, 2016

Copy link to clipboard

Copied

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

Community Beginner
Correct answer by jaank | Community Beginner

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

TOPICS
Actions and scripting

Views

162

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Preventing fill dialog box with scripting

Community Beginner ,
Sep 04, 2016

Copy link to clipboard

Copied

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

Community Beginner
Correct answer by jaank | Community Beginner

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

TOPICS
Actions and scripting

Views

163

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 04, 2016 0
Community Beginner ,
Sep 05, 2016

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 05, 2016 0