Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Get user settings from a Canvas Resize dialog using executeAction

$
0
0

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.


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>