Tried to use script listener to capture AM code for setting the corner radius of rectangle shapes. Below is what I got and it seems logical, but nothing happens when I run it independently. The right layer is selected but maybe I need to set a reference to the layer somehow? AM side is not my strong suit so hoping someone can pick up my mistake.. Example has 8px radius that was set with all corners locked, but I've also tried replacing 0's with the value.
var idchangePathDetails = stringIDToTypeID( "changePathDetails" );
var desc22 = new ActionDescriptor();
var idkeyOriginType = stringIDToTypeID( "keyOriginType" );
desc22.putInteger( idkeyOriginType, 1 );
var idkeyOriginRRectRadii = stringIDToTypeID( "keyOriginRRectRadii" );
var desc23 = new ActionDescriptor();
var idunitValueQuadVersion = stringIDToTypeID( "unitValueQuadVersion" );
desc23.putInteger( idunitValueQuadVersion, 1 );
var idtopRight = stringIDToTypeID( "topRight" );
var idPxl = charIDToTypeID( "#Pxl" );
desc23.putUnitDouble( idtopRight, idPxl, 0 );
var idtopLeft = stringIDToTypeID( "topLeft" );
var idPxl = charIDToTypeID( "#Pxl" );
desc23.putUnitDouble( idtopLeft, idPxl, 8.0 );
var idbottomLeft = stringIDToTypeID( "bottomLeft" );
var idPxl = charIDToTypeID( "#Pxl" );
desc23.putUnitDouble( idbottomLeft, idPxl, 0 );
var idbottomRight = stringIDToTypeID( "bottomRight" );
var idPxl = charIDToTypeID( "#Pxl" );
desc23.putUnitDouble( idbottomRight, idPxl, 0 );
var idradii = stringIDToTypeID( "radii" );
desc22.putObject( idkeyOriginRRectRadii, idradii, desc23 );
var idkeyActionRadiiSource = stringIDToTypeID( "keyActionRadiiSource" );
desc22.putInteger( idkeyActionRadiiSource, 1 );
var idkeyActionChangeAllCorners = stringIDToTypeID( "keyActionChangeAllCorners" );
desc22.putBoolean( idkeyActionChangeAllCorners, true );
executeAction( idchangePathDetails, desc22, DialogModes.NO );
... View more