Scripting Windows GUI application with Python (SendKeys)

Bill Tutt billtut at microsoft.com
Mon May 17 21:22:18 EDT 1999


If/when someone does, please forward the bits off to Mark Hammond so we can
get it as part of the Win32 extensions.

Thanks,

Bill

> -----Original Message-----
> From: Paulo Soares [mailto:psoares at consiste.pt]
> Sent: Monday, May 17, 1999 9:40 AM
> To: 'python-list at cwi.nl'
> Subject: RE: Scripting Windows GUI application with Python (SendKeys)
> 
> 
> The WIN32 API function to send keys to an application that 
> has the focus
> is keybd_event in win9X/NT and SendInput in win98/NT.
> You can also have a look at John Robbins' Feb '99 Microsoft Systems
> Journal Bugslayer Column where he describes a way to parse the keys as
> Visual Basic does.
> I have altered this code to provide very simple scripting to a tape
> backup procedure.
> I can send it if you want it. Is is written in Visual C++ 6.0 
> but it is
> trivial to extract the needed parts and make a python extension.
> 
> Best Regards,
> Paulo Soares
> 
> > -----Original Message-----
> > From:	Christian Lemer [SMTP:Christian.Lemer at usrconsult.be]
> > Sent:	Monday, May 17, 1999 15:12
> > To:	python-list at cwi.nl
> > Subject:	Scripting Windows GUI application with Python (SendKeys)
> > 
> > Dear all,
> > 
> > Currently we use WinBatch to automate some tests and productions
> > application under Windows NT.
> > 
> > One year ago, we switched from Perl to Pyton as script 
> language under
> > unix.
> > 
> > I wonder if it is possible to drive a Windows GUI application (using
> > keybord commands) like it is possible in Winbatch with Python under
> > Windows?
> > 
> > I installed also the windows extensions but couldn't find 
> the correct
> > way to send a key to an application.
> > 
> > Thanks in advance for your help.
> > 
> > Chris.
> > 
> > -- 
> > Christian LEMER                                    tel 
> +32.10.65.44.11
> > UsrConsult S.P.R.L                                 fax 
> +32.10.65.44.10
> > rue Margot, 37
> > http://www.usrconsult.be
> > B-1457 Nil St Vincent             
mailto:Christian.Lemer at usrconsult.be




More information about the Python-list mailing list