Page 1 of 1

Emulate MouseMove and MouseEvents

Posted: Mon Jul 21, 2003 12:34 am
by Ralf
Want to write a prog for small autoscripts to remote (move) mouse on any application window with simulating mouse clicks. For example you will record your mouse and mouseclicks and when press play on my tool, this tool will display exactly the same mousemoving and mouseclicks.

How is this possible? Any Pure or API calls!? For example i want something like:

SetMousePos(x,y)
SetMouseClick(0) ; 0 = left, 1 = right or something like this
SetMousePos(x,y)

Can someone help me with any good documented example?

Posted: Mon Jul 21, 2003 1:47 am
by Paul
Platform SDK (Windows API)...

SetCursorPos - positions cursor anywhere you want
Mouse_Event - sends left and right mouse clicks

Posted: Sat Jul 26, 2003 12:06 pm
by Ralf
Works fine! Many thanks Paul! :D