How do I use SendInput in Python?

A

Adam W.

I'm at the last stage of my project and the only thing left to do is
trigger a mouse click. I did some searching around for example code
and stumped upon SendInput http://msdn2.microsoft.com/en-us/library/ms646310.aspx
.. However I was not able to find example code for python USING
SendInput, and I have zero ability to make C work (or whatever that is
written in). Can someone help me use SendInput in python, or point me
to an alternative method?
 
G

Gabriel Genellina

I'm at the last stage of my project and the only thing left to do is
trigger a mouse click. I did some searching around for example code
and stumped upon SendInput
http://msdn2.microsoft.com/en-us/library/ms646310.aspx
. However I was not able to find example code for python USING
SendInput, and I have zero ability to make C work (or whatever that is
written in). Can someone help me use SendInput in python, or point me
to an alternative method?

Try sendkeys: http://www.rutherfurd.net/python/sendkeys/index.html
PyWinAuto uses the above library and lets you automate an application in a
very simple way:
http://www.openqa.org/pywinauto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top