How to suppress the color profile dialog (CC 2018)
Hi,
how do you suppress solely the color profile dialog in a script (JavaScript) when opening a file, but not all dialogs?
Hi,
how do you suppress solely the color profile dialog in a script (JavaScript) when opening a file, but not all dialogs?
black_square ha scritto
Yes, I mean the dialog appearing when the embedded profile does not match the working color space and I want to suppress it by some code, not the settings.
these are the codes
// Disable color profile
var desc6 = new ActionDescriptor();
var desc7 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ));
ref1.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));
desc6.putReference( charIDToTypeID( "null" ), ref1 );
desc7.putBoolean( stringIDToTypeID( "askMismatchOpening" ), false );
desc7.putBoolean( stringIDToTypeID( "askMismatchPasting" ), false );
desc7.putBoolean( stringIDToTypeID( "askMissing" ), false );
desc6.putObject( charIDToTypeID( "T " ), stringIDToTypeID( "colorSettings" ), desc7 );
executeAction( charIDToTypeID( "setd" ), desc6, DialogModes.NO );
// Enable color profile
var desc6 = new ActionDescriptor();
var desc7 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ));
ref1.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));
desc6.putReference( charIDToTypeID( "null" ), ref1 );
desc7.putBoolean( stringIDToTypeID( "askMismatchOpening" ), true );
desc7.putBoolean( stringIDToTypeID( "askMismatchPasting" ), true );
desc7.putBoolean( stringIDToTypeID( "askMissing" ), true );
desc6.putObject( charIDToTypeID( "T " ), stringIDToTypeID( "colorSettings" ), desc7 );
executeAction( charIDToTypeID( "setd" ), desc6, DialogModes.NO );
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.