Jump to content

Mouse drag return


Recommended Posts

Its in the new beta release on the autoit forum download page. Here is the code I used, its a little sloppy but it works fine for me (or so it seems...).

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    $oldpos = MouseGetPos()
    Sleep(250)
    $newpos = MouseGetPos()

    If $newpos[1] > $oldpos[1] Then
        If _IsPressed("01", $dll) Then
            MsgBox(0,"_IsPressed", "You clicked and draged down!")
        EndIf
    
    ElseIf $newpos[1] < $oldpos[1] Then
        If _IsPressed("01", $dll) Then
            MsgBox(0,"_IsPressed", "You clicked and draged up!")
        EndIf
    EndIf

WEnd

DllClose($dll)
Link to comment
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
 Share

  • Recently Browsing   0 members

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