how can i transform the isosceles trapezoid to a rectangle by extensionscript?

i have many different Isosceles trapezoids?
listener:
var idTrnf = charIDToTypeID( "Trnf" );
var desc48 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref21 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref21.putEnumerated( idLyr, idOrdn, idTrgt );
desc48.putReference( idnull, ref21 );
var idFTcs = charIDToTypeID( "FTcs" );
var idQCSt = charIDToTypeID( "QCSt" );
var idQcsa = charIDToTypeID( "Qcsa" );
desc48.putEnumerated( idFTcs, idQCSt, idQcsa );
var idOfst = charIDToTypeID( "Ofst" );
var desc49 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idPxl = charIDToTypeID( "#Pxl" );
desc49.putUnitDouble( idHrzn, idPxl, -16.066570 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idPxl = charIDToTypeID( "#Pxl" );
desc49.putUnitDouble( idVrtc, idPxl, 16.381048 );
var idOfst = charIDToTypeID( "Ofst" );
desc48.putObject( idOfst, idOfst, desc49 );
var idWdth = charIDToTypeID( "Wdth" );
var idPrc = charIDToTypeID( "#Prc" );
desc48.putUnitDouble( idWdth, idPrc, 134.475806 );
var idSkew = charIDToTypeID( "Skew" );
var desc50 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idAng = charIDToTypeID( "#Ang" );
desc50.putUnitDouble( idHrzn, idAng, 19.127500 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idAng = charIDToTypeID( "#Ang" );
desc50.putUnitDouble( idVrtc, idAng, 0.000000 );
var idPnt = charIDToTypeID( "Pnt " );
desc48.putObject( idSkew, idPnt, desc50 );
var idUsng = charIDToTypeID( "Usng" );
var desc51 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idPrc = charIDToTypeID( "#Prc" );
desc51.putUnitDouble( idHrzn, idPrc, -0.000000 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idPrc = charIDToTypeID( "#Prc" );
desc51.putUnitDouble( idVrtc, idPrc, 0.655242 ); //0.655242 Represents the percentage of the vertical direction?How to calculate it,
var idPnt = charIDToTypeID( "Pnt " );
desc48.putObject( idUsng, idPnt, desc51 );
var idPnt = charIDToTypeID( "Pnt " );
desc48.putObject( idUsng, idPnt, desc51 );
var idIntr = charIDToTypeID( "Intr" );
var idIntp = charIDToTypeID( "Intp" );
var idbicubicAutomatic = stringIDToTypeID( "bicubicAutomatic" );
desc48.putEnumerated( idIntr, idIntp, idbicubicAutomatic );
executeAction( idTrnf, desc48, DialogModes.NO );
