Jump to content
Sign in to follow this  
qazwsx

Make the mouse move a direction

Recommended Posts

qazwsx

Is there a way to make the mouse move a certain number of pixels in a certain direction, not to any specific coordinates?

Share this post


Link to post
Share on other sites
Leighwyn

Is there a way to make the mouse move a certain number of pixels in a certain direction, not to any specific coordinates?

Add the amount of pixels desired to the starting positing.

$oldpos = MouseGetPos()

$deltax = 10
$deltay = 50

MouseMove($oldpos[0]+$deltax,$oldpos[1]+$deltay)

Share this post


Link to post
Share on other sites
MisterBates

Is there a way to make the mouse move a certain number of pixels in a certain direction, not to any specific coordinates?

Given a direction and distance, convert to x,y "delta" using acos/asin functions, then apply the resulting deltas to mousemove.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×