title: program for controlling mouse or keyboard
body: <p>I'm trying to learn how a program I write can control a GUI program that I'm running. I'm not sure the GUI program will necessarily expose an API for developers. Therefore, I think the best approach will be for my program to be able to exclusively control the keyboard and mouse temporarily or maybe share the control with the user (as long as the user isn't using the resources the program can control mouse/keyboard).</p>
  
  <p>I'm not sure how to do this. I know C/C++, Python and Java. I'm mainly looking to implement this on Windows (I know C#).</p>
  
  <p>I'm not exactly sure what I'm looking for (in terms of keywords) so I don't know how to google for information. Any help would be appreciated.</p>
  
  <p>EDIT: I thought I'd mention that I'm just looking for a method for my code to control mouse and keyboard. The inputs to this code will come from another piece of code which (hopefully) knows what the mouse/keyboard will have to do. Currently I just want to learn how to make my code control mouse/keyboard using a predefined control commands (e.g. move to position (100,100), click, type "abcd" etc.</p>