The application of
SendKeys
is very limited. The most reliable way to send keyboard and mouse input is using low-level Windows API
SendInput
, see
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[
^]. This is practically what keyboard and mouse drivers ultimately do.
I need to
warn you though: using this for collaboration between different processed is bad thing.
Using it for UI development is even worse. This is just a hack, no more, not reliable, not supportable.
I would advise to avoid communication between processes via simulation of user input by all means.
—SA