Resize window height to 75% and move TOP of window up accordingly

I was able to create an action, "set height to 75%". Basically, if I hold right-option and scroll down, it expands the window to 75%. Perfect. Well, almost perfect.
For a window whose top of window is also top of screen, it just perfectly adds to the height of the window, by adding that height at the bottom of the window.
For a window whose top of window is, for example, located at the 50% Y axis of the screen (i.e. top of window is in middle of screen), it still adds the height to the bottom. But of course that added height is off screen, because the window's bottom (in this case) is also the bottom of the screen before resize.
So, for a window located in the lower left or lower right quadrant, I want the action to (1) set the window height to 75%, and (2) reposition the window bottom to bottom of screen. I'm not sure how to do that one...(I'm still very very new to BTT).