How do you make a program to interface with another?
In C++ (the programming language I am most familiar with), how easy or hard would it be to make a program which interacted with another program. Say for example, how easy would it be to write a program which interacted with msn to send out a nudge or a predefined message to a certain contact at a regular time interval. How easy would it be to write a program which could cause another program to send out different predefined messages (continuing the idea with msn), depending on what the contact in the conversation wrote?
How exactly would/could all the previously mentioned things be done?