Copy link to clipboard
Copied
Is it possible to set the "Auto Color Correction Options" on a levels adjustment via scripting? I tried AM code and it does not record the settings.
I want to set it to "Find Dark & Light colors" and then set a color for the Shadow & Highlight color selections.
Also, I know I have seen (from a script or something in the past) a version of the levels or curves palette window that was larger and had those options visible on the single screen, instead of in the 2nd popup options palette...anyone know how to do that? Am I crazy? I swear I have seen that...just can't remember where.
Copy link to clipboard
Copied
I'm not sure what is possible... xbytor's xtools action to js provided the following:
#target photoshop
//
// Action6.jsx
//
//
// Generated Fri Nov 08 2019 11:04:59 GMT+1100
//
cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
//
//==================== Action 6 ==============
//
function Action6() {
// Curves
function step1(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
desc1.putEnumerated(sTID("presetKind"), sTID("presetKindType"), sTID("presetKindCustom"));
var list1 = new ActionList();
var desc2 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Cmps'));
desc2.putReference(cTID('Chnl'), ref1);
desc2.putBoolean(sTID("autoBlackWhite"), true);
list1.putObject(cTID('CrvA'), desc2);
desc1.putList(cTID('Adjs'), list1);
executeAction(cTID('Crvs'), desc1, dialogMode);
};
step1(); // Curves
};
//=========================================
// Action6.main
//=========================================
//
Action6.main = function () {
Action6();
};
Action6.main();
// EOF
"Action6.jsx"
// EOF
Find Dark & Light colors = autoBlackWhite – however, the target colour values were not captured in the action and therefore not present in the script.
Copy link to clipboard
Copied
Thanks for the reply. I don't think it's possible to get to those settings via a script.
However, I figured out a workaround...I looked at what those settings actually do and I can just recreate the result by directly controlling the levels.
Copy link to clipboard
Copied
Also, I know I have seen (from a script or something in the past) a version of the levels or curves palette window that was larger and had those options visible on the single screen, instead of in the 2nd popup options palette...anyone know how to do that? Am I crazy? I swear I have seen that...just can't remember where.
You mean this window
var desc5 = new ActionDescriptor();
var desc6 = new ActionDescriptor();
var desc7 = new ActionDescriptor();
var desc8 = new ActionDescriptor();
var list1 = new ActionList();
var list2 = new ActionList();
var ref1 = new ActionReference();
desc5.putEnumerated( stringIDToTypeID( "presetKind" ), stringIDToTypeID( "presetKindType" ), stringIDToTypeID( "presetKindCustom" ));
ref1.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Cmps" ));
desc6.putReference( charIDToTypeID( "Chnl" ), ref1 );
desc7.putDouble( charIDToTypeID( "Hrzn" ), 0.000000 );
desc7.putDouble( charIDToTypeID( "Vrtc" ), 0.000000 );
list2.putObject( charIDToTypeID( "Pnt " ), desc7 );
desc8.putDouble( charIDToTypeID( "Hrzn" ), 255.000000 );
desc8.putDouble( charIDToTypeID( "Vrtc" ), 255.000000 );
list2.putObject( charIDToTypeID( "Pnt " ), desc8 );
desc6.putList( charIDToTypeID( "Crv " ), list2 );
list1.putObject( charIDToTypeID( "CrvA" ), desc6 );
desc5.putList( charIDToTypeID( "Adjs" ), list1 );
executeAction( charIDToTypeID( "Crvs" ), desc5, DialogModes.ALL );
Copy link to clipboard
Copied
Ah...yes, I think that must have been the one. Thanks, at least I know I was not completely out of my mind. 😉
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Oh, thanks for this too!