954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

color based mouse movement

Hi all. I recently wrote a python program that takes a screenshot of the current active window. After taking that screenshot, it saves it as a bmp (using PIL), and then goes thru each pixel, looking for a certain color. If it finds that color, it moves the mouse to that location (using ctypes) I am trying to write this in c++, but due to python's speed issues (I'm no expert with c++, I've been dawdling more than anything) and was wondering how to go about taking a screenshot of the active window (I've already got down clicking and mouse movement, using window.h) Is there any type of library that could do this, or is somewhat similar to python's PIL? Any comments/suggestions would be appreciated. Thanks!

fallopiano
Junior Poster in Training
68 posts since Jun 2009
Reputation Points: 10
Solved Threads: 6
 

read this tutorial

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

thanks, but you wouldn't happen to know of a link that actually tells me what functions/libs to use? that web page you gave me is of someones program (alot of .cpp and .h files, although it does take screenshots)

fallopiano
Junior Poster in Training
68 posts since Jun 2009
Reputation Points: 10
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You