qwertylol Posted May 9, 2007 Share Posted May 9, 2007 mousemove works, but it moves the mouse in a fashion that's accelerate in the beginning, and then decelerate when it closes up on the destination. I need the moues to move in a uniform speed, is that possible? Link to comment Share on other sites More sharing options...
=sinister= Posted May 9, 2007 Share Posted May 9, 2007 Not to my knowledge, but you can make it instant? Link to comment Share on other sites More sharing options...
qwertylol Posted May 9, 2007 Author Share Posted May 9, 2007 well it's an old game that locks the mouse cursor to the center of the screen when you do something and then when you move the mouse it translates to panning the camera. that's why I need to to just move it 5 to the left and I can't seem to use coordianted mousemove. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 9, 2007 Share Posted May 9, 2007 well it's an old game that locks the mouse cursor to the center of the screen when you do something and then when you move the mouse it translates to panning the camera. that's why I need to to just move it 5 to the left and I can't seem to use coordianted mousemove.I haven't figured out what you mean by "coordianted mousemove" yet. Run this demo and reply with what you need that's different: ; Move mouse 5 pixels each time an arrow is hit: #Include <Misc.au3> Global $LEFT = "25", $UP = "26", $RIGHT = "27", $DOWN = "28" Global $MouseSpeed = 50 ; 0=instant, 1=fastest, 100=slowest HotKeySet("{END}", "_Quit") While 1 $avMousePos = MouseGetPos() If _IsPressed($LEFT) Then $avMousePos[0] -= 5 If _IsPressed($UP) Then $avMousePos[1] -= 5 If _IsPressed($RIGHT) Then $avMousePos[0] += 5 If _IsPressed($DOWN) Then $avMousePos[1] += 5 MouseMove($avMousePos[0], $avMousePos[1], $MouseSpeed) Sleep(20) WEnd Func _Quit() Exit EndFunc ;==>_Quit Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 9, 2007 Share Posted May 9, 2007 I haven't figured out what you mean by "coordianted mousemove" yet. Run this demo and reply with what you need that's different:i think that by "coordinated mousemove" he means that he wants the mouse to move at the same speed all the time, not in the more natural way it is by default!! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
qwertylol Posted May 9, 2007 Author Share Posted May 9, 2007 exactly, i need it to move at the same uniform speed. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 9, 2007 Share Posted May 9, 2007 exactly, i need it to move at the same uniform speed.You can see the non-linear speed across 5 pixels?! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
qwertylol Posted May 12, 2007 Author Share Posted May 12, 2007 no, the mouse cursor actually doesn't appear to move for 5 pixels. it's the camera panned by the movement of the mouse, which, equal to 5 pixels but looking out from the the panned camera of 5 pixels it's quite a difference. and the un uniform speed mess things up. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 13, 2007 Share Posted May 13, 2007 no, the mouse cursor actually doesn't appear to move for 5 pixels. it's the camera panned by the movement of the mouse, which, equal to 5 pixels but looking out from the the panned camera of 5 pixels it's quite a difference. and the un uniform speed mess things up.You may be stuck with coding your own loop of 1 pixel moves. By tweaking a delay Sleep() in the loop you might achieve the speed and smoothness you want. A movement of 1 pixel, by definition, can't have a "speed" so it will be at the speed of your loop: For $m = 0 To 1 For $n = 1 To 100 $avMousePos = MouseGetPos() If $m Then $avMousePos[0] += 1 Else $avMousePos[0] -= 1 EndIf MouseMove($avMousePos[0], $avMousePos[1]) Sleep(20) ; Tweak this sleep for speed Next Next Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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