Jump to content

Recommended Posts

Posted

Ummmm.... SmOke_N, I don't know if you're still trying to help or just throwing out an option but I created a function that worked like a charm for what I wanted.

Func _MouseMovePlus($X,  $Y, $dll = 0)
        Local $MOUSEEVENTF_MOVE = 0x1
    If $dll = 0 Then 
    DllCall("user32.dll", "none", "mouse_event", _
            "long",  $MOUSEEVENTF_MOVE, _
            "long",  $X, _
            "long",  $Y, _
            "long",  0, _
        "long",  0)
    Else
    DllCall($dll, "none", "mouse_event", _
            "long",  $MOUSEEVENTF_MOVE, _
            "long",  $X, _
            "long",  $Y, _
            "long",  0, _
        "long",  0)
    EndIf
EndFunc

Example Usage:

;Moves mouse right 3 and up 1
_MouseMovePlus(3,-1)
  • Moderators
Posted

Ummmm.... SmOke_N, I don't know if you're still trying to help or just throwing out an option but I created a function that worked like a charm for what I wanted.

Func _MouseMovePlus($X,  $Y, $dll = 0)
        Local $MOUSEEVENTF_MOVE = 0x1
    If $dll = 0 Then 
    DllCall("user32.dll", "none", "mouse_event", _
            "long",  $MOUSEEVENTF_MOVE, _
            "long",  $X, _
            "long",  $Y, _
            "long",  0, _
        "long",  0)
    Else
    DllCall($dll, "none", "mouse_event", _
            "long",  $MOUSEEVENTF_MOVE, _
            "long",  $X, _
            "long",  $Y, _
            "long",  0, _
        "long",  0)
    EndIf
EndFunc

Example Usage:

;Moves mouse right 3 and up 1
_MouseMovePlus(3,-1)
No, I know you got it to work, just thought it might give you / others some insight or other ideas/options.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...