Jump to content
  • Advertisement
Sign in to follow this  
M2tM

Screen Capture + Mouse Clicks in windows?

This topic is 4197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm toying around with the idea of creating a program that will act as a bejeweled solver just as a fun project. I want to get a handle on where to start though and so I was wondering if any of you could point me to some references on the following subjects: -Partial Screen Capture or full screen capture, but basically I need to be able to analyze colour values of pixels on the screen at set coordinates. -Detecting keyboard input without the window having focus (as it'll be clicking on a different window) -simulating mouse movement and mouse clicks I'm fairly certain I'll have no problems with the non-os specific stuff, but I'm not really sure how to approach these three issues. If anyone has any suggestions I'd be glad to hear about them. I know C++ fairly well, though haven't done any significant windows programming before I am a little familiar with Windows Forms and how that managed c++ environment works... I do not know C#, and I don't mind learning it, but I'd rather do it in C++ if possible just to avoid the extra time learning C# and I just want to make a small fun program (which I plan to do, but not immediately) Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Found this for screen capture... The mouse clicks should be easier...

http://www.codeproject.com/managedcpp/ijwscrcap.asp

Share this post


Link to post
Share on other sites
Hi,

1 -) You can capture any area of screen by creating a compatible DC, bitblt'ing DesktopWindow to it. then getting it's data with GetDIBits function.. then you can analyze RGB values.
2 -) You can use system hooks for this task. Check out SetWindowsHookEx function in MSDN.
3 -) You can use SendInput() function. You can use this function for simulating both Keyboard input and mouse input.

Sorry for my worse english :(

Deniz Piri.
denizpiri@denizpiri.com

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!