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

Re: Get user settings from a Canvas Resize dialog using executeAction

$
0
0

Thanks Tom!

 

I thought that the returned ActionDescriptor would have the same structure as the input one, now I can get the values selected by the user:

 

 

idHrzV = typeIDToCharID( outputDesc.getEnumerationValue( stringIDToTypeID( "horizontal" ) ) );
idVrtV = typeIDToCharID( outputDesc.getEnumerationValue( stringIDToTypeID( "vertical" ) ) );

 

But I found another problem, a weird behaviour, the script I am doing, from an input picture, ouputs the same picture with a list of predefined aspect ratios, both expanding the canvas to fit the aspect ratio, or by cropping it. So I ask the user for the anchor poing twice per image. The weird thing is, the first time I ask, the ActionDescriptor only have the width and horizontal anchor:

 

objectName : (new String("Photoshop Application"))
width : ({type:"#Pxl", typeString:"pixelsUnit", value:4196})
horizontal : ({type:"HrzL", typeString:"horizontalLocation", value:"Left", valueString:"left"})

 

And the next time it return only the height and the vertical anchor:

 

objectName : (new String("Photoshop Application"))
height : ({type:"#Pxl", typeString:"pixelsUnit", value:7460})
vertical : ({type:"VrtL", typeString:"verticalLocation", value:"Bttm", valueString:"bottomEnum"})

 

I'm using Photoshop CS6 (64bit), what can be the problem? :/


Viewing all articles
Browse latest Browse all 27456


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