I have successfully used windpysend for several years. It is not elegant -- you have to feed the characters slowly -- but works reliably enough that I automated several casino server start-up scripts using it, and the casino is very happy that the users no longer foul things up.
It is not open source, but the license is inexpensive. See: http://users.swing.be/wintclsend/windpysend/<http://users.swing.be/wintclsend/windpysend/> -- Vernon Cole On Mon, Aug 3, 2009 at 9:05 AM, Kimmo Kekkonen <kekkonen.ki...@gmail.com>wrote: > Hi! > > I were wondering if it is possible to use Python to select a window > (by title or somehow) and then input text into it? I'd need the trick > to input text to program I am running from cmd. When program opens it > also opens one "GUI" window and focus to the cmd will lost. Now I'd > like to get focus back to cmd and then input text into it. I tried > PIPEs with Popen but after 6 hours of work it still did not work. I > think it is because of this my program. > > Also I am trying to close active window. Is there a solution to send > "alt+f4" to currently active window? > > I managed to do these tricks using WSH but I would like to use Python > so I would not have to do these "window activations and closing" by > WSH. Then I will have 100% Python script without any others. > > Thanks in advance! > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > >
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32