How to automate taking a screenshot of specific proportions

I want to make a macro that will take screenshots of two windows, one after another.

However in one window, I want to take a screenshot of only specific part. So from the entire window below I want to only make screenshot of that specific part highlighted

I was thinking of activating screencapture CLI and then moving the mouse relative to the windw and then releasing mouse but not sure exactly how to do that and if there is a better way. I know beforehand the size of my window.

Thank you for any help.

Use the Screen Capture action.


Thank you @peternlewis, this works.