Could probably do it with AutoIt. http://www.autoitscript.com/
I wish you had never showed me that program haha. It is now 3 A.M and I finally got it to do what I wanted and its not exactly what I would call pretty.
It took me about 5 hours to write 12 lines of code ....