convertPathtoShape(); function convertPathtoShape() { var d = new ActionDescriptor(); var d2 = new ActionDescriptor(); var d3 = new ActionDescriptor(); var d4 = new ActionDescriptor(); var r = new ActionReference(); r.putClass( stringIDToTypeID( "contentLayer" )); d.putReference( charIDToTypeID( "null" ), r ); d4.putDouble( charIDToTypeID( "Rd " ), 255); d4.putDouble( charIDToTypeID( "Grn " ), 255); d4.putDouble( charIDToTypeID( "Bl " ), 255); d3.putObject( charIDToTypeID( "Clr " ), charIDToTypeID( "RGBC" ), d4 ); d2.putObject( charIDToTypeID( "Type" ), stringIDToTypeID( "solidColorLayer" ), d3 ); d.putObject( charIDToTypeID( "Usng" ), stringIDToTypeID( "contentLayer" ), d2 ); executeAction( charIDToTypeID( "Mk " ), d, DialogModes.NO ); }