Discussion:
[python-win32] PyWin32
f***@gmail.com
2014-08-25 12:52:56 UTC
Permalink
Hi,


I want to use PyWin32 to make the system think a keyboard key is being pressed. I don’t know very much about WIn32 at all and nor have I been able to find out how to use the modules so any help would be really appreciated.


Thanks,


Patrick Farnworth
Tim Roberts
2014-08-26 17:05:09 UTC
Permalink
Post by f***@gmail.com
I want to use PyWin32 to make the system think a keyboard key is being
pressed. I don’t know very much about WIn32 at all and nor have I been
able to find out how to use the modules so any help would be really
appreciated.
There is a SendKeys module available in the PyPI library, although it's
still for Python 2, and the download link isn't currently responding:
https://pypi.python.org/pypi/SendKeys/0.3

The API you use for this is called SendInput. Here is a code snippet for
Python 3 that uses the SendInput API to do this:

http://stackoverflow.com/questions/1823762/sendkeys-for-python-3-1-on-windows
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Loading...