How large a file is depens on many factors. File type and the settings used creating files plays a very big part. However the major size component on any image file type format is always the recording of the images pixels.
Just look at saving a Jpeg file whithout changing the image size you can save jpeg files that have 13 sizes just using the quality setting.
For example for this raw file IMG_2771.CR2 7,541,502 with these ACR setting IMG_2771.xmp 7,281 saving jpeg file using settinge 0 through 12 produces these file sizes range under 200KB to over 3.5MB
So, do you think it is not possible to "force" the final dimension of a file? Doesn't exist any sintax in Extendscript that refers to the bytes or something similar?
Repeat How large a file is depens on many factors. You have not even specified a file type. Only an uncompressed file format would have a predictable file size.
Look at it this way the bigest part on any image file is the recording of its pixels. Most file formats will use data compressing in the process recording pixel data. You can not predict the size data will compress to for it depend on the data content. Think of data content as image content. How much detail is there is the image very buzzy like a crossword puzzle or does it have huge consistant areas like blue sky. If you look at your camera files captured af full resolition the all have the same number of pixels. Look at their file sizes RAW and JPEG do all image have the same file size after all the all have the same number of pixels and meta data. Do any nave the same file size sort them by size.
»dimensions« usually refers to the horizontal and vertical measurements, not the file’s size in bytes.
And you still have not even mentioned the file format …
A poster in this thread seems to have found a Script that helped him with regard to file-size (Edit:) for Save for Web & Devices: