Ok, I made and now have an API spy so I can get all the info I need for calling up windows, giving commands, etc., but I need to know some things, I'll put my questions in order so they are easier to answer.

1. How can I have my program watch for a window in another program pop up?

2. How can I tell my program to click a button on the other program once the window has popped up?

3. How can I make my program watch for specific browser (E.I., Netscape, whatever) popups, then close them once they pop up?

4. How can I make my program minimize into the systems tray and not into the taskbar?