Hi,
I'm trying to get the user settings from the canvas resize dialog. I want to ask once, and the use those settings, mainly the anchor point, in the rest of images. This is what I have:
var inputDesc = new ActionDescriptor(); var idWdth = charIDToTypeID( "Wdth" ); var idPxl = charIDToTypeID( "#Pxl" ); inputDesc.putUnitDouble( idWdth, idPxl, tImageWidth ); var idHght = charIDToTypeID( "Hght" ); var idPxl = charIDToTypeID( "#Pxl" ); inputDesc.putUnitDouble( idHght, idPxl, tImageHeight ); var outputDesc = executeAction( charIDToTypeID( "CnvS" ), inputDesc, DialogModes.ALL ); var idHrzV = outputDesc.getEnumerationValue( charIDToTypeID( "Hrzn" ) ); var idVrtV = outputDesc.getEnumerationValue( charIDToTypeID( "VrtC" ) );
With the values on idHrzV and idVrtV, I'll call resizeCanvas, but it seems executeAction is not returning nothing. Did I get it wrong? Maybe this is not possible at all... If you have any suggestions, please, let me know.