Sign in to follow this  
Followers 0
auratus

Automating Morrowind

6 posts in this topic

#1 ·  Posted (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 by auratus

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Post your code please, i left my crystal ball at my neighbors

There 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)
EndFunc
This 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 by auratus

Share this post


Link to post
Share on other sites

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

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