interacting with gui-based programs
claird at lairds.com
Thu Feb 20 18:45:17 CET 2003
In article <33b7435c.0302200444.26c7073 at posting.google.com>,
Dave <googlegroups at thuswise.com> wrote:
>Simon Brunning <SBrunning at trisystems.co.uk> wrote in message
>news:<mailman.1045649995.30290.python-list at python.org>...
>> > From: bronzesink77 at hotmail.com [SMTP:bronzesink77 at hotmail.com]
>> > Thanks for the reply. I must say, I'm surprised that the only way to
>> > interact with the GUI of Mozilla and Kazaa running on Linux is using a
>> > closed-source program (AutoIt). Do langauges other than Python have
>> > modules that could be compiled and used with Python to interact with
>> > these GUIs? What language could AutoIt be written in that is more
>> > capable than Python?
>I've had some success using Expect (which is based on TCL). It redirects
>the tty of a shell session, both in and out, so that keystrokes from the
>user may be scripted, and output parsed and analysed. In other words, to
>script an interactive session.
>If the GUI app is well equipped with shortcut keystrokes to menu items,
>maybe this would in these cases too?. The advantage of going through the user
>interface of the app is that it would work across platforms.
>The good news is that there are a couple of Python implementations of
>Expect. One (the one I happen to prefer) is pure Python, and the other
>is a wrapper around the original. Do a Google for pyExpect or expectpy.
>I can't remember which is which off the top of my head.
>Hope this helps,
Neither Kazaa nor Mozilla exposes a scripting interface?
I thought I knew differently, but I'm quite ignorant about
In any case, if you're truly reduced to record-and-playback,
study Android <URL: http://wiki.tcl.tk/android >.
I *am* expert with Expect and its descendants, but I don't
get the connection to Mozilla. That must reflect how little
I know about Mozilla.
Cameron Laird <Cameron at Lairds.com>
More information about the Python-list