How can i code a program that detects if the computer is connected to the internet, and if not dials a connection.... and then goes to outlook express (already open) and runs the option "tools/send and receive/send and receive all" (shortcut <ctrl c>).

thanks,

Dan