imitating user input

Terry Reedy tjreedy at udel.edu
Sun Apr 18 18:37:47 EDT 2004


"Greg Grin" <grigri9 at yahoo.com> wrote in message
news:ebd4b44c.0404181137.6ec29ba8 at posting.google.com...
> I need to imitate keyboard strokes in an active window inside of
> internet explorer, specifically I need my program to log on to a
> chatroom without me actually sitting in front of my computer. Also,
> once it has logged on to the program I need my program to "read"
> (search for strings, etc.) the text that's entered by other users in
> this "chatroom". The problem I have is actually logging in to the
> chatroom since I have not found a way to duplicate keyboard strokes.

For this problem, you do *not* need to imitate keystrokes (and mouseclicks)
in the way that you would for interacting with a local interactive program.
You *do* need to send and receive strings through internet sockets
according to the Internet Relay Chat protocol (assuming that that is the
protocol used by the site you are interested in.  There are existing chat
programs that can be scripted in Python.  The Python-coded Twisted package
also includes an IRC implementation.  Some of the other internet packages
may also.

Look at
http://twistedmatrix.com/users/jh/teud/Twisted/twisted.protocols.irc.html
or google Python Internet Relay Chat protocol, as I did, for more.

Terry J. Reedy







More information about the Python-list mailing list