Threads merged. Don't just create a new thread asking the same question please. Be patient and someone will answer you.
The question is if this kind of program control is possible ...
Most things are possible. Perhaps you can ask a more specific question? Preferably one that shows you used Google or similar to do some research of your own.