Good to hear!
I cleaned up the function a little more and now it takes arguments for the Stroke Width and Color, too. (Stroke Width 0 meaning no Stroke.)
It should probably also include the option for no Fill and just a Stroke … but if you should ever need that maybe you can figure the necessary changes out yourself or post again.
// 2024, use it at your own risk;
ellipseShapeLayer ([500,500,1000,1000], [0,128,255], 10, [0,0,0]);
//////
function ellipseShapeLayer (theBounds, theColor, strokeWidth, strokeColor) {
try {
// Make outer oval
var idPxl = charIDToTypeID( "#Pxl" );
var idPnt = charIDToTypeID( "#Pnt" );
var idClr = charIDToTypeID( "Clr " );
var idRd = charIDToTypeID( "Rd " );
var idGrn = charIDToTypeID( "Grn " );
var idBl = charIDToTypeID( "Bl " );
var idRGBC = charIDToTypeID( "RGBC" );
var idcontentLayer = stringIDToTypeID( "contentLayer" );
var idsolidColorLayer = stringIDToTypeID( "solidColorLayer" );
var idstrokeStyle = stringIDToTypeID( "strokeStyle" );
var idstrokeStyleLineAlignment = stringIDToTypeID( "strokeStyleLineAlignment" );
var idstrokeStyleLineJoinType = stringIDToTypeID( "strokeStyleLineJoinType" );
var desc41 = new ActionDescriptor();
var ref12 = new ActionReference();
ref12.putClass( idcontentLayer );
desc41.putReference( charIDToTypeID( "null" ), ref12 );
var desc42 = new ActionDescriptor();
var desc43 = new ActionDescriptor();
var desc44 = new ActionDescriptor();
desc44.putDouble( idRd, theColor[0] );
desc44.putDouble( idGrn, theColor[1] );
desc44.putDouble( idBl, theColor[2] );
desc43.putObject( idClr, idRGBC, desc44 );
desc42.putObject( charIDToTypeID( "Type" ), idsolidColorLayer, desc43 );
var desc45 = new ActionDescriptor();
desc45.putUnitDouble( charIDToTypeID( "Top " ), idPxl, theBounds[0] );
desc45.putUnitDouble( charIDToTypeID( "Left" ), idPxl, theBounds[1] );
desc45.putUnitDouble( charIDToTypeID( "Btom" ), idPxl, theBounds[2] );
desc45.putUnitDouble( charIDToTypeID( "Rght" ), idPxl, theBounds[3] );
desc42.putObject( charIDToTypeID( "Shp " ), charIDToTypeID( "Elps" ), desc45 );
var desc46 = new ActionDescriptor();
desc46.putInteger( stringIDToTypeID( "strokeStyleVersion" ), 2 );
if (strokeWidth == 0) {desc46.putBoolean( stringIDToTypeID( "strokeEnabled" ), false )}
else {desc46.putBoolean( stringIDToTypeID( "strokeEnabled" ), true )};
desc46.putBoolean( stringIDToTypeID( "fillEnabled" ), true );
desc46.putUnitDouble( stringIDToTypeID( "strokeStyleLineWidth" ), idPnt, strokeWidth );
desc46.putUnitDouble( stringIDToTypeID( "strokeStyleLineDashOffset" ), idPnt, 0.000000 );
desc46.putDouble( stringIDToTypeID( "strokeStyleMiterLimit" ), 100.000000 );
desc46.putEnumerated( stringIDToTypeID( "strokeStyleLineCapType" ), stringIDToTypeID( "strokeStyleButtCap" ), stringIDToTypeID( "strokeStyleButtCap" ) );
desc46.putEnumerated( idstrokeStyleLineJoinType, idstrokeStyleLineJoinType, stringIDToTypeID( "strokeStyleMiterJoin" ) );
desc46.putEnumerated( idstrokeStyleLineAlignment, idstrokeStyleLineAlignment, stringIDToTypeID( "strokeStyleAlignCenter" ) );//strokeStyleAlignOutside
desc46.putBoolean( stringIDToTypeID( "strokeStyleScaleLock" ), false );
desc46.putBoolean( stringIDToTypeID( "strokeStyleStrokeAdjust" ), false );
var list3 = new ActionList();
desc46.putList( stringIDToTypeID( "strokeStyleLineDashSet" ), list3 );
desc46.putEnumerated( stringIDToTypeID( "strokeStyleBlendMode" ), charIDToTypeID( "BlnM" ), charIDToTypeID( "Nrml" ) );
desc46.putUnitDouble( stringIDToTypeID( "strokeStyleOpacity" ), charIDToTypeID( "#Prc" ), 100.000000 );
var desc47 = new ActionDescriptor();
var desc48 = new ActionDescriptor();
desc48.putDouble( idRd, strokeColor[0] );
desc48.putDouble( idGrn, strokeColor[1] );
desc48.putDouble( idBl, strokeColor[2] );
desc47.putObject( idClr, idRGBC, desc48 );
desc46.putObject( stringIDToTypeID( "strokeStyleContent" ), idsolidColorLayer, desc47 );
desc46.putDouble( stringIDToTypeID( "strokeStyleResolution" ), 300 );
desc42.putObject( idstrokeStyle, idstrokeStyle, desc46 );
desc41.putObject( charIDToTypeID( "Usng" ), idcontentLayer, desc42 );
executeAction( charIDToTypeID( "Mk " ), desc41, DialogModes.NO );
} catch (e) {alert ("fail")}
};

