Place embedded
Is the command "Place embedded" scriptable with Javascript in order to add a file as smart object to an opened document, without copy&paste? Thank you
Is the command "Place embedded" scriptable with Javascript in order to add a file as smart object to an opened document, without copy&paste? Thank you
var filePath = new File('~/path/to/image.png');
placeEmbeded(filePath);
function placeEmbeded(filePath) {
var actDesc = new ActionDescriptor();
actDesc.putPath(charIDToTypeID('null'), filePath);
actDesc.putEnumerated(charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa'));
executeAction(charIDToTypeID('Plc '), actDesc, 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.