Advertisement

How can i mock a mouse click?

Started by November 26, 2000 09:20 PM
0 comments, last by NovaChen 24 years, 2 months ago
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?
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.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement