Examples of Python driven Microsoft UI Automation wanted

Paul McGuire ptmcg at austin.rr.com
Thu Jul 9 16:41:17 EDT 2009


On Jul 9, 1:50 pm, DuaneKaufman <duane.kauf... at gmail.com> wrote:
> > I have used pywinauto to drive a Flash game running inside of an
> > Internet Explorer browser - that's pretty GUI!
>
> > -- Paul
>
> Hi,
>
> Could you share some code examples?
>
> Thanks,
> Duane (duanek (at) chorus (dot) net)

I just went on a brief fishing expedition through two disk backups,
and no luck.  I guess it's been a while since I worked on this.

The work I did was entirely graphical, which is to say, my script
interacted with the Flash program by using PIL to take image snapshots
of the window, and then sifting through the bitmap looking for the
status of a "time remaining" thermometer-style gauge in the game.
Then the script could click on X-Y coordinates within the window,
which would get picked up by the Flash game, and the script would
monitor the "time remaining" gauge some more, and so on.

I'm not sure how well pywinauto would work in allowing you to access
controls such as textboxes within a form.  I remember that I had to
access the IE window using a caption name, and then found the embedded
Flash program as an embedded control of some sort, again, I probably
needed to indicate that it was some sort of "Adobe.FlashWidget1"
object or something.

I may have another, older disk backup at home, I can look for it later
this evening.

-- Paul



More information about the Python-list mailing list