This assumes you want to center in the window excluding the treebar. Change the -3 to -2 or -1 if appropriate. It also assumes the window is already the correct size but is in the wrong spot. Replace $window(%win).w and .h with the actual desired widths when appropriate
//var %win $active | window $active $calc( ($window(-3).w - $window(%win).w) //2) $calc( ($window(-3).h - $window(%win).h) //2) $window(%win).w $window(%win).h
Alternatively, you should simply move the location of the @window to the correct size and location, then use the upper-left menu for /position/save and the window will default to that location+size the next time you open it.