generation of keyboard events

Tim Harig usernet at ilthio.net
Mon Jul 6 12:25:33 EDT 2009


On 2009-07-06, RAM <serverin2000 at yahoo.com> wrote:
> I am trying to do this on windows. My program(executable) has been
> written in VC++ and when I run this program, I need to click on one
> button on the program GUI i,e just I am entering "Enter key" on the
> key board. But this needs manual process. So i need to write a python
> script which invokes my program and pass "Enter key" event to my
> program so that it runs without manual intervention.

This can be done using the WScript.WshShell.SendKeys() method when running
Python with Windows Scripting Host by using the .pyw extension:

http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx



More information about the Python-list mailing list