AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

conditional double click robbing normal click function?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
lightbulb



Joined: 16 Mar 2005
Posts: 9

PostPosted: Thu Jun 16, 2005 3:19 am    Post subject: conditional double click robbing normal click function? Reply with quote

Can anyone correct me on how a normal single left click functions sans AHK? I run an alternate shell, and I set up the following to automatically double click the tray apps (Gaim, specifically).

My problem? I am now robbed of the ability to double click anything else *very quickly* - I have to slow my finger down a little bit, which goes against years of double clicking swiftly. Perhaps I'm doing this in a clunky manner? I'm still a newbie at this.

Code:
$LButton::
MouseGetPos,,,, tray  ; get classNN of tray plugin
if tray = bbIconBox1  ; happens to be classNN of tray plugin
{
   MouseClick, left,,, 2  ; double click
}
else
{
   MouseClick, left,,, 1, 0, D  ; mouse down
   KeyWait, LButton   ; so I can drag
   MouseClick, left,,, 1, 0, U  ; mouse up
}
return
Back to top
View user's profile Send private message AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Thu Jun 16, 2005 12:47 pm    Post subject: Reply with quote

Try adding the following as the first line in the ELSE block:
SetMouseDelay, -1

It will prevent extra delays that are normally done in conjunction with mouse clicks.

The -1 setting should not be used for the entire script because that would likely make traditional use of the MouseClick/Drag commands ineffective or unreliable.
Back to top
View user's profile Send private message Send e-mail
lightbulb



Joined: 16 Mar 2005
Posts: 9

PostPosted: Thu Jun 16, 2005 2:07 pm    Post subject: Reply with quote

Considerable improvement. Thanks.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group