Thanks Stephen. I think I would probably need separate fields for width and height in order for me to enter appropriate figures to constrain the overall dimensions to 2400px x 1600px. Just having the long edge dimension means that I would get 2400px for the width of a portrait image whereas I'm looking for 1600px.
By @NigelD1
In the short term, I suggest you uncheck the tickbox in the script to fit the longest edge. As the script can reference an action, you can always record the File > Auto
...