How to perform mouse/keyboard events for user? Like macro tools do

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to do something similar to what some macro tools do, where they
perform mouse/keyboard events on the user's machine , while intercepting the
user's current keyboard/mouse events so that it does not interfere (unless
they press a certain hotkey to deactivate it). How would I go about doing
this?
 
This would be a two-step process. To send input to an application, you
will have to call the SendInput API function through the P/Invoke layer. To
intercept all input for a window, you will have to create a windows hook
(which will require more calls through the P/Invoke layer).
 
Back
Top