1. how can you do a script that waits for you to connect to server, then when its connected, the script would do nothing, but it would let you know if it has disconnected.
2. how could i print to anywhere, not just command prompt?
Unfortunately, it is against site policy for us to do your homework for you. You can write the code and if you get stuck, post it here and we will nudge you in the right direction, but we cannot give you the answers, sorry.