开发者

Are there any libraries for Python to simulate keyboard action?

开发者 https://www.devze.com 2022-12-12 14:22 出处:网络
The problem I have is that I have this Python script to launch a application. After the application is launched (the GUI is shown o开发者_如何学JAVAn screen), I want to make it de-activated. It can be

The problem I have is that I have this Python script to launch a application. After the application is launched (the GUI is shown o开发者_如何学JAVAn screen), I want to make it de-activated. It can be done manually by activating another window, or minimizing this app, or pressing the Show Desktop key for WindowsXP.

So is there any way that I can do this by Python? Core or 3rd party library would be all ok.

Thanks!


Take a look at SendKeys. It is in the pypi, so you can install it via easy_install.


You can use pywin32 to send a minimize event.


I've used AutoIt (via it's COM interface) a lot of times

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号