Emulate MouseMove and MouseEvents

Just starting out? Need help? Post your questions and find answers here.
Ralf
Enthusiast
Enthusiast
Posts: 203
Joined: Fri May 30, 2003 1:29 pm
Location: Germany

Emulate MouseMove and MouseEvents

Post 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?
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Platform SDK (Windows API)...

SetCursorPos - positions cursor anywhere you want
Mouse_Event - sends left and right mouse clicks
Image Image
Ralf
Enthusiast
Enthusiast
Posts: 203
Joined: Fri May 30, 2003 1:29 pm
Location: Germany

Post by Ralf »

Works fine! Many thanks Paul! :D
Post Reply