So, I've been trying to create a custom switchbar for a few days, I think I got into a big problem

The problem is that I cannot activate some windows. For example, even a Status Window, or some other like Finger Window, Channel List and so on. At first, I thought I would do this with /sendkeys %#, but the problem is that # cannot be over 9, sendkeys %(10) or (%(10)) does not work. So, my question would be - is it possible to activate a window (a DLL, COM script), if I have its hwnd, wid and every property needed. I hope it is and I am waiting for a person, who will show me how, impatiently

P.S. It would be very good if someone showed a way to destroy a window using its hwnd, too. Thanks.