views:

788

answers:

2

I am trying to use SendInput() to send a sentence to another application (Notepad) and then send it hitting the Enter Key.

Any code snippets? Or help

+1  A: 

The SendInput function accepts an array of INPUT structures. The INPUT structures can either be a mouse or keyboard event. The keyboard event structure has a member called wVk which can be any key on the keyboard. The Winuser.h header file provides macro definitions (VK_*) for each key.

Idan K
A: 

Theres a simple C++ sample here http://nibuthomas.wordpress.com/2009/08/04/how-to-use-sendinput/

And a more complete VB sample here http://vb.mvps.org/samples/SendInput/

John Knoeller