Convert to Smart Object
I am trying to get the active layer to convert to a smart object via script.
After using the script listener to get the text from clicking the context menu on the active layer to "convert to smart object", I got these lines:
// =======================================================
var idinvokeCommand = stringIDToTypeID( "invokeCommand" );
var desc20 = new ActionDescriptor();
var idcommandID = stringIDToTypeID( "commandID" );
desc20.putInteger( idcommandID, 2980 );
var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );
desc20.putBoolean( idkcanDispatchWhileModal, true );
executeAction( idinvokeCommand, desc20, DialogModes.NO );
// =======================================================
var idnewPlacedLayer = stringIDToTypeID( "newPlacedLayer" );
executeAction( idnewPlacedLayer, undefined, DialogModes.NO );
But when I try to run the same lines from ESTK, it says "Genral Error" this operation may not be supported in this version of Photoshop...
What am I doing wrong? Thank you for any wisdom.