Sign in to follow this  
Followers 0
tengwer

detect dbl click

2 posts in this topic

I've tried everything I can think of to create a simple script that will call a function when the left mouse button is doubleclicked. But I have run into every problem from the script working but I'm not able to click an drag anymore with it running to it only working once and then not at all. This is the script I currently have:

#include <MouseSetOnEvent_UDF.au3>

$x = 0

_MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT , "Click")

Sleep(100)

_MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ;Enable mouse button back.

While 1

$x += 1

sleep(100)

WEnd

Func Click()

If $x < 3 Then DoubleClick()

$x = 0

;MsgBox(4096,"","Click",2)

EndFunc

Func DoubleClick()

MsgBox(4096,"","DoubleClick",2)

$x = 0

EndFunc

It only works on the first double click and then doen't do anything. Can anyone help?

Share this post


Link to post
Share on other sites



FYI I already tried the parameter $MOUSE_PRIMARYDBLCLK_EVENT and it did not work at all.

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