To make chat windows goes to fokus, you use /window -a $active.

To make dialog windows sit nicely at the corner, you use /dialog -s name x y w h
To determine x y w h, you need $window().dx dy dw dh, $dialog().cw ch and play some math with those values to get correct position.