Re: Screenshot from another program



On 11/27/06, Johanna Leimer <johleimer yahoo de> wrote:
I want to write some code that is able to:
- make a screenshot of another running program (has a fixed window title).
- after that I need to extract rectangular areas from different locations
within that screenshot
- after that it should analyse (read RGB values) the colours of all the
pixels in that area.

Here's a tiny program I wrote that does (almost) what you want:

 http://cima.ng-london.org.uk/~john/zoobot.c

it's a robot that plays the flash game "zookeeper":

 http://www.ebaumsworld.com/zookeeper.html

It's X11 rather than XP, but it only uses X11-only calls to move the
mouse pointer and send clicks. The code for doing a screendump and
analyzing it cross-platform.

I'm not sure how you'd find a window by window title, sorry.

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]