We help IT Professionals succeed at work.

how to make the mouse cursor move??

armansiu
armansiu asked
on
156 Views
Last Modified: 2013-11-20
how to create a random mouse cursor-mover??
please help
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
like this...

int x = ... whatever;
int y = ... whatever;
mouse_event(MOUSEEVENTF_ABSOLUTE,x,y,0,0);

This will move the mouse to the given screen location.

If you want truly random movement, use rand() function and use SystemParametersInfo to get the size of the screen etc so you know the range of mouse positions available.

           
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.