aSigN Posted July 26, 2009 Share Posted July 26, 2009 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 Link to comment Share on other sites More sharing options...
aSigN Posted July 26, 2009 Author Share Posted July 26, 2009 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 Link to comment Share on other sites More sharing options...
monoceres Posted July 26, 2009 Share Posted July 26, 2009 (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 July 26, 2009 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Rarst Posted July 26, 2009 Share Posted July 26, 2009 (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 July 26, 2009 by Rarst AutoIt tag at Rarst.net Link to comment Share on other sites More sharing options...
aSigN Posted July 26, 2009 Author Share Posted July 26, 2009 (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 FunctionI Could Only Think Of MouseGetPos And MouseMoveBut That Won't Work, as I said some program/game like "call of duty" stick your mouse to the centerso MouseMove won't work Edited July 26, 2009 by aSigN Link to comment Share on other sites More sharing options...
aSigN Posted July 26, 2009 Author Share Posted July 26, 2009 (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 July 26, 2009 by aSigN Link to comment Share on other sites More sharing options...
Rarst Posted July 26, 2009 Share Posted July 26, 2009 Mouse(100,0,1)in the game it would just turn right all the timeIf 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? AutoIt tag at Rarst.net Link to comment Share on other sites More sharing options...
BrettF Posted July 26, 2009 Share Posted July 26, 2009 (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 July 26, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
aSigN Posted July 26, 2009 Author Share Posted July 26, 2009 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 Link to comment Share on other sites More sharing options...
aSigN Posted July 26, 2009 Author Share Posted July 26, 2009 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,BrettEDIT: Clarified.Stop talking with capital letters on every word//Well I Have Problem With my Computer Link to comment Share on other sites More sharing options...
Rarst Posted July 26, 2009 Share Posted July 26, 2009 Sorry Right I mean is right that it's opposite of LeftLost 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. AutoIt tag at Rarst.net Link to comment Share on other sites More sharing options...
BrettF Posted July 26, 2009 Share Posted July 26, 2009 Stop talking with capital letters on every word//Well I Have Problem With my ComputerThen I assume you managed to miss the SEARCH part. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now