@frmorel
Raw SL recording:
var idmake = stringIDToTypeID( "make" );
var desc237 = new ActionDescriptor();
var idnull = stringIDToTypeID( "null" );
var ref23 = new ActionReference();
var idadjustmentLayer = stringIDToTypeID( "adjustmentLayer" );
ref23.putClass( idadjustmentLayer );
desc237.putReference( idnull, ref23 );
var idusing = stringIDToTypeID( "using" );
var desc238 = new ActionDescriptor();
var idtype = stringIDToTypeID( "type" );
var desc239 = new ActionDescriptor();
var idpresetKind = stringIDToTypeID( "presetKind" );
var idpresetKindType = stringIDToTypeID( "presetKindType" );
var idpresetKindDefault = stringIDToTypeID( "presetKindDefault" );
desc239.putEnumerated( idpresetKind, idpresetKindType, idpresetKindDefault );
var idcolorize = stringIDToTypeID( "colorize" );
desc239.putBoolean( idcolorize, false );
var idhueSaturation = stringIDToTypeID( "hueSaturation" );
desc238.putObject( idtype, idhueSaturation, desc239 );
var idadjustmentLayer = stringIDToTypeID( "adjustmentLayer" );
desc237.putObject( idusing, idadjustmentLayer, desc238 );
executeAction( idmake, desc237, DialogModes.NO );
Or run through Clean SL:
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
var descriptor3 = new ActionDescriptor();
var reference = new ActionReference();
reference.putClass( s2t( "adjustmentLayer" ));
descriptor.putReference( s2t( "null" ), reference );
descriptor3.putEnumerated( s2t( "presetKind" ), s2t( "presetKindType" ), s2t( "presetKindDefault" ));
descriptor3.putBoolean( s2t( "colorize" ), false );
descriptor2.putObject( s2t( "type" ), s2t( "hueSaturation" ), descriptor3 );
descriptor.putObject( s2t( "using" ), s2t( "adjustmentLayer" ), descriptor2 );
executeAction( s2t( "make" ), descriptor, DialogModes.NO );