Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NovaChen

How can i mock a mouse click?

This topic is 6588 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

In my hand, there is a special tool which is out of support and I didn''t have a source code document of such tool. But i now eager to get some information from it. What i should do is: push a button, then push "print screen" key, switch to bitmap editor, paste the bitmap from the clipboard and crop a special part , at last save it to disk. It will be a annoying work if you have to do such work hundreds time. Then I hope to write a program to do it automatically. First mock a mouse click at special place, second mock a "print screen", third do with the clipboard data. But I don''t know how to send a mouse or key message to another process. any suggestion?

Share this post


Link to post
Share on other sites
Advertisement
You send the window a message, WM_MOUSE_something, and the l&wparams are the point clicked. There''s a Win32 API function that gets you a window handle given the name of the app (which is not always obvious)

fish around in on msdn.microsoft.com and look up Plaform/Win32API in the library.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!