@JohnnyJomp – A few quick hacks to an old script:
// https://forums.adobe.com/message/10377562#10377562
#target photoshop
app.activeDocument.suspendHistory("Proportionally Resize Height of Selected Layers...", "main()");
function main() {
preferences.rulerUnits = Units.PIXELS
function sTT(v) {
return stringIDToTypeID(v)
}
(ref = new ActionReference()).putEnumerated
(sTT('document'), sTT('ordinal'), sTT('targetEnum'))
len = executeActionGet(ref).getInteger(sTT('numberOfLayers'))
// Loop the input prompt until a number is entered
var newHeightInput;
while (isNaN(newHeightInput = prompt("Enter a new height in pixels for the selected layers:", "1000")));
// Convert decimal input to integer
var newHeight = parseInt(newHeightInput);
// Test if Cancel returns null, then do nothing
if (newHeight === null) { return }
// Test if an empty string is returned, then do nothing
if (newHeight === "") { return }
for (i = 1; i <= len;) {
(ref = new ActionReference()).putIndex(sTT('layer'), i++)
if (typeIDToStringID((dsc = executeActionGet(ref)).getEnumerationValue(sTT(lS = 'layerSection'))) == lS + 'Content') {
(lst = new ActionList()).putReference(ref), dsc.putList(sTT('null'), lst)
if (!dsc.getBoolean(sTT('visible'))) {
executeAction(sTT('show'), dsc, DialogModes.NO)
}
(ref = new ActionReference()).putIndex(sTT('layer'), i - 1);
(dsc = new ActionDescriptor()).putReference(sTT('null'), ref)
executeAction(sTT('select'), dsc, DialogModes.NO)
with (activeDocument.activeLayer) {
resize(s = newHeight / ((b = bounds)[3] - b[1]) * 100, s)
}
}
}
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html