AutoHotkey Community

It is currently May 27th, 2012, 11:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: August 25th, 2009, 6:50 am 
Offline

Joined: March 10th, 2009, 10:13 am
Posts: 27
Hi.
would be nice to be able to hook a double click using something like
Code:
LButton(2)::
   MsgBox, Double Click!
   return


a few things to consider for this :
1. double click delay is a configurable system property which should probably be considered
2. what is someone hooks LButton(2) and also LButton(3) ?

its possible to achieve this using AHK's current capabilities but:
1. need to fetch the system double click delay myself
2. need to check subsequent clicks are over the same component/control


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 7:18 pm 
Offline

Joined: January 22nd, 2009, 3:43 pm
Posts: 84
I like the idea, especially if you could build a sequence and finetune
the delay and time-out of each click in the sequence e.g:

Lbutton(2,50,200)::WheelDown(0,200)::

Would trigger if Leftbutton is pressed twice with a minimum delay of 50 between clicks and within a timeout of 200 between clicks AND if
this doubleclick is followed by a wheeldown click immediately ( 0 delay)
after the Lbutton doubleclick and not later than timeout 200

if a clickaction has 3 arguments, like:

Lbutton(2,50,200)::

The delay/timeout revers to the delay/timeout between 2 or more of the same
LButton clicks

If only 2 arguments, like :

WheelDown(0,200)::

The delay/timeout rever to the delay and timeout AFTER the previous LButton clicks, setting a timeframe of 0-200 within you must Wheeldown
in order to complete/trigger the whole sequence


system variables could by introduced to count the time within the clicks
have been produced.

For instance to create progressive scrolling:

Wheeldown(2,0,100)::
Loop, A_WheelDown
Click, WheelDown


Where 2 wheeldown action within a timeout of 100 are required to perform a number of wheeldown action as stored in A_WheelDown.

A_WheelDown would be calculated as followed:

if 2 wheeldown actions are performed in exacty 100,
A_Wheeldown=1.

if however they were performed in 50,
A_Wheeldown = 2

performed in 25:

A_Wheeldown = 4

Naturally, Wheeldowns are almost never exactly clicked by the user
in exactly 100, 50, 25, more likely 33, 69 etc, so A_Wheeldown must round this to nearest integer range, e.g. 33 = 25 = 4 * Wheeldown


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group