Hi @wyatts93859812,
do you mean something like that?
The main "problem" is the basic structure of the script. Ultimately, only two loops are required:
// https://community.adobe.com/t5/illustrator/adjust-varying-lengths-of-line-at-once/td-p/11099361?page=1
// resize_increase_height_based_on_xPosition.jsx
// regard pixxxelschubser 03. März 2020
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// required: opened document, only lines with the same height on the active layer //
// all paths are ungrouped and simple paths (lines) //
// no selection needed //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
main();
app.redraw();
alert("Done");
function main() {
var aDoc = app.activeDocument;
var Pths = aDoc.activeLayer.pathItems;
var len = Pths.length;
var list = new Array ();
var toMM = 2.83464567;
var Pth, item, factor, inc;
inc = prompt ("Please enter the value of increment (mm)", 2, "Increment");
if (inc == null) { return; }
if (inc.match(/[0-9]+/) == null) { return;}
inc = inc*1;
for (i = 0; i < len; i++) {
Pth = new Array (2);
Pth[0] = Pths[i].left;
Pth[1] = Pths[i];
list.push(Pth);
}
list.sort();
for (k = len-1; k >= 0 ; k--) {
item = list[k][1];
factor = (item.height +inc*toMM*k)*100/item.height;
list[k][1].resize( 100, factor, true, true, true, true, 100, Transformation.CENTER );
}
};
Before:

During:

Result:

If that works for you
have fun
😉