[Tutor] Stuffing keystrokes into windows App.
Christian Wyglendowski
Christian.Wyglendowski at greenville.edu
Mon Dec 22 09:27:13 EST 2003
A quick google for "python sendkeys" turned this up:
http://www.rutherfurd.net/python/sendkeys/ Don't know if it works with
python beyond 2.1, but I imagine it would.
The following page has examples using the WSH COM interface to get to
sendkeys (that way you don't need to download a separate module).
http://aspn.activestate.com/ASPN/Mail/Message/activepython/544878
That should get you going!
Christian
> -----Original Message-----
> From: Eddie Comber [mailto:python at comber.cix.co.uk]
> Sent: Monday, December 22, 2003 6:12 AM
> To: tutor at python.org
> Subject: [Tutor] Stuffing keystrokes into windows App.
>
>
> I have a 3rd party Windows app that does have a COM interface
> but I can't work it all out.
>
> I think I need just to bring the windows app to the focus and
> stuff keystrokes into it.
>
> Any suggestions as to how this might be done?
>
> I think it will help a lot to look at this Excel Macro that
> does what I want.
>
> AppActivate "LV-ST"
> For j = 1 To 50
> 'THIS SENDS THE CONTENTS OF THE a(ITEMNO) WITH A
> CARRIAGE RETURN
> 'CHARACTER (y) THEN BACKSPACE
> SendKeys a$(j) & Chr$(13) & "y" & "{BS}", True
> Next j
>
> Tall order perhaps but
> thanks in anticipation,
> Eddie.
>
>
>
>
More information about the Tutor
mailing list