how can i set and change the focus of a window & bring it to the front via a script

eg

Code:
/setwindow #MyChannel