auratus Posted August 26, 2006 Share Posted August 26, 2006 (edited) I am trying to make a bot for Morrowind to acomplish some repetative tasks that I don't feel like doing over and over myself. I used AU3Info to get the coordinates where I needed mouse clicks, but when I run the program, the mouse cursor shoots off the screen. I even tried MouseMove(1,10) and it still went off the screen. Any advice on how to get this to work? Note that I have tried this in both windowed mode and full screen with the same results. Edited August 26, 2006 by auratus Link to comment Share on other sites More sharing options...
Vivvic Posted August 26, 2006 Share Posted August 26, 2006 I have the game but am unable to test due to having no optical drive in my test machine and having just 'tuned' my LAN machine it is out of the question untill Friday, sorry. if you still havnt gotten an answer by Friday, I will look into it. [quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote] Link to comment Share on other sites More sharing options...
Paulie Posted August 27, 2006 Share Posted August 27, 2006 I am trying to make a bot for Morrowind to acomplish some repetative tasks that I don't feel like doing over and over myself. I used AU3Info to get the coordinates where I needed mouse clicks, but when I run the program, the mouse cursor shoots off the screen. I even tried MouseMove(1,10) and it still went off the screen. Any advice on how to get this to work? Note that I have tried this in both windowed mode and full screen with the same results.Post your code please, i left my crystal ball at my neighbors Link to comment Share on other sites More sharing options...
Oxin8 Posted August 27, 2006 Share Posted August 27, 2006 Try using this function instead. I wrote it when having a similar problem with BF1942. Func _MouseMovePlus($X, $Y) Local $MOUSEEVENTF_MOVE = 0x1 DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndFunc ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
auratus Posted August 27, 2006 Author Share Posted August 27, 2006 (edited) Post your code please, i left my crystal ball at my neighborsThere really isn't much code to post. Just MouseMove(). Try using this function instead. I wrote it when having a similar problem with BF1942. Func _MouseMovePlus($X, $Y) Local $MOUSEEVENTF_MOVE = 0x1 DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndFuncThis seems to work a little better than just MouseMove(), however, it moves the mouse relative to it's current position. After a little tinkering, I might get this to work, but I am still open to other suggestions. Also, can someone please point me towards more info on $MOUSEEVENTF_MOVE, such as the syntax for mouse clicks? Edited August 27, 2006 by auratus Link to comment Share on other sites More sharing options...
Oxin8 Posted August 27, 2006 Share Posted August 27, 2006 Sorry, forgot that I had it set up for relative coords. Try this instead. The documentation for it is at http://msdn.microsoft.com/library/default....mouse_event.asp if this doesn't work.Func _MouseMovePlus($X, $Y) Local $MOUSEEVENTF_MOVE = 32769 DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndFunc ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus 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