Yinan
Yinan

Reputation: 2786

Are there any libraries for Python to simulate keyboard action?

The problem I have is that I have this Python script to launch a application. After the application is launched (the GUI is shown on 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!

Upvotes: 2

Views: 1853

Answers (3)

Miki Tebeka
Miki Tebeka

Reputation: 13850

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

Upvotes: 0

Roger Pate
Roger Pate

Reputation:

You can use pywin32 to send a minimize event.

Upvotes: 0

Isaiah
Isaiah

Reputation: 4309

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

Upvotes: 4

Related Questions