View Single Post
Old 7th June 2014, 16:18   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,218
You cannot send keyboard events to a process, you can send them to the top level window by calling SendInput or keybd_event with the system plugin.

You can try to fake the messages if you need to send to a specific window by sending WM_KEYDOWN/UP messages.

I hope you are not trying to click Yes in some security dialog because that is evil. And what if the language is not English?

If you are doing a lot of automation you can try AutoIt or something like that.

What is the actual goal? Which application are you controlling and can it be done in a different way that does not involve sending fake input?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote