Hi,
I was helped on here a few months ago about a script that would promopt the user to create a levels adjustment layer, set the levels and then the script would be able to call the information again and apply the levels without user intervention.
Since upgrading to Photoshop CC it has stopped working correctly and I can't figure out why as it doesn't come up with any errors. It works on the prompt, alows the user to enter levels ect but when it comes to apply it to the next image it will just create an unaltered levels adjustment and move on. The script is below, any help would be much appreciated!
/// user prompt
var newLevelsDesc = newLevels(); //// apply levels without user
executeAction( charIDToTypeID('Mk '), newLevelsDesc, DialogModes.NO );
function newLevels() { try{
var desc2 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putClass( charIDToTypeID('AdjL') );
desc2.putReference( charIDToTypeID('null'), ref1 );
var desc3 = new ActionDescriptor();
var desc4 = new ActionDescriptor();
desc4.putEnumerated( stringIDToTypeID('presetKind'), stringIDToTypeID('presetKindType'), stringIDToTypeID('presetKindDefault') );
desc3.putObject( charIDToTypeID('Type'), charIDToTypeID('Lvls'), desc4 );
desc2.putObject( charIDToTypeID('Usng'), charIDToTypeID('AdjL'), desc3 );return executeAction( charIDToTypeID('Mk '), desc2, DialogModes.ALL );}catch (e){ }};