boogieoompa Posted December 4, 2006 Share Posted December 4, 2006 Does anybody know how to wait for the user to click and drag. Effectively I want to execute a command when the user does a click and drag within a program however I do not know how to monitor for the mouse down with a mouse move. Any suggestions? Link to comment Share on other sites More sharing options...
exodius Posted December 4, 2006 Share Posted December 4, 2006 Maybe check out _IsPressed in the Beta? Link to comment Share on other sites More sharing options...
mike1234 Posted December 4, 2006 Share Posted December 4, 2006 I cant find _ispressed in the help file. Link to comment Share on other sites More sharing options...
boogieoompa Posted December 5, 2006 Author Share Posted December 5, 2006 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 More sharing options...
exodius Posted December 5, 2006 Share Posted December 5, 2006 I cant find _ispressed in the help file.Download and install the BetaView the Beta Documentation 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