Sign in to follow this  
Followers 0
aSigN

Any Mouse Move Function?

12 posts in this topic

In some Program/game make the mouse alway in the middle of the screen ex.Call Of Duty.

My Question Is: Is there any function to move the mouse like ex.MoveMouse(x,y,s)

x=move mouse x axis to any value ex.mousemove(50,0,0) my mouse will move 50 pixel right

y=move mouse y axis to any value ex.mousemove(0,-50,0) my mouse will move 50 pixel down

s=mouse speed from 0 to 100 ex.mousemove(50,-50,0) my mouse will move 50 pixel down and 50 pixel right instantly

Share this post


Link to post
Share on other sites



If There's No Function

Could Any Body Request This Function For Me Because,

I Dont Know How To Use Bug Reports and Feature Requests

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

No There Is No Such Function But You Can Easily Write Your Own With The Combination Of Two Very Simple Functions. To Know Which Functions I Mean Please RTFM.

Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

MouseGetPos to get current coords, MouseMove to move cursor on new coords.

In single funciton this would be like:

Mouse(100,100)
Exit

Func Mouse($x, $y,$speed=10)
    $pos=MouseGetPos()
    MouseMove($pos[0]+$x,$pos[1]+$y,$speed)
EndFunc

But I am not sure how it would work in full screen DirectX app like shooter.

Edited by Rarst

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

No There Is No Such Function But You Can Easily Write Your Own With The Combination Of Two Very Simple Functions. To Know Which Functions I Mean Please RTFM.

Thank For The Idea But Could You Tell The 2 Function

I Could Only Think Of MouseGetPos And MouseMove

But That Won't Work, as I said some program/game like "call of duty" stick your mouse to the center

so MouseMove won't work

Edited by aSigN

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

MouseGetPos to get current coords, MouseMove to move cursor on new coords.

In single funciton this would be like:

Mouse(100,100)
Exit

Func Mouse($x, $y,$speed=10)
    $pos=MouseGetPos()
    MouseMove($pos[0]+$x,$pos[1]+$y,$speed)
EndFunc

But I am not sure how it would work in full screen DirectX app like shooter.

That Work But Not In The Shooter Game

If I Did

Mouse(100,0,1)
Exit

Func Mouse($x, $y,$speed=10)
    $pos=MouseGetPos()
    MouseMove($pos[0]+$x,$pos[1]+$y,$speed)
EndFunc

in the game my mouse would just turn right all the time

Edited by aSigN

Share this post


Link to post
Share on other sites

Mouse(100,0,1)

in the game it would just turn right all the time

If you are making mouse cursor move right 100px, isn't is supposed to turn right? It is bit unclear - had you tried this and it fails (if so in what way?) or just assuming?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Stop talking with capital letters on every word. It makes you look stupid Remember to only bump your post once in a 24 hour period (24 hours after your last post).

Also I'm pretty sure this has been answered before, so search for it.

Cheers,

Brett

EDIT: Clarified.

Edited by BrettF

Share this post


Link to post
Share on other sites

If you are making mouse cursor move right 100px, isn't is supposed to turn right? It is bit unclear - had you tried this and it fails (if so in what way?) or just assuming?

Sorry Right I mean is right that it's opposite of Left

Share this post


Link to post
Share on other sites

Stop talking with capital letters on every word. It makes you look stupid Remember to only bump your post once in a 24 hour period (24 hours after your last post).

Also I'm pretty sure this has been answered before, so search for it.

Cheers,

Brett

EDIT: Clarified.

Stop talking with capital letters on every word//Well I Have Problem With my Computer

Share this post


Link to post
Share on other sites

Sorry Right I mean is right that it's opposite of Left

Lost me here. Moving cursor 100px on horizontal axis is moving right. To move left it would be -100px on horizontal axis.

So your game moves screen differently to how funciton moves your cursor? I know 1st person games can have vertical axis reversed, but moving left/right is usually just that.

Share this post


Link to post
Share on other sites

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  
Followers 0