boogieoompa 0 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? Share this post Link to post Share on other sites
exodius 1 Posted December 4, 2006 Maybe check out _IsPressed in the Beta? Share this post Link to post Share on other sites
mike1234 0 Posted December 4, 2006 I cant find _ispressed in the help file. Share this post Link to post Share on other sites
boogieoompa 0 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) Share this post Link to post Share on other sites
exodius 1 Posted December 5, 2006 I cant find _ispressed in the help file.Download and install the BetaView the Beta Documentation Share this post Link to post Share on other sites