In scripting you do have access to mask info, but I don’t think there’s a way to detect which mask is selected.
If you could specify the mask by number, it would be a bit of work, but you could set up a loop that would check each mask vertex for min x, min y, max x, and max y. It would then be easy to calculate the width and height of the bounding box.
Then what would you want to do with that info?
Dan