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 

Hotkeys for double-clicks? (right mouse button)

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



Joined: 07 Feb 2009
Posts: 384

PostPosted: Tue Feb 10, 2009 7:05 pm    Post subject: Hotkeys for double-clicks? (right mouse button) Reply with quote

Does AHK have a simple hotkey expressions for the double-clicks?

I'm trying to replace ClickZap with something like this:

Quote:

[RButton double-click]
::
Send, {ALTDOWN}{F4}{ALTUP}
return
Back to top
View user's profile Send private message
evan
Guest





PostPosted: Tue Feb 10, 2009 7:20 pm    Post subject: Reply with quote

?
Code:
~Rbutton::
KeyWait, Rbutton
KeyWait, Rbutton, d T1
if Errorlevel != 1
msgbox, double click
return
Back to top
pajenn



Joined: 07 Feb 2009
Posts: 384

PostPosted: Tue Feb 10, 2009 7:45 pm    Post subject: Reply with quote

Thank you evan! (that was quick)

Here's the script for closing an active window (or to begin windows shutdown if no windows) with double-right clicks (for win xp/sp3 at least):

Code:
~Rbutton::
KeyWait, Rbutton
KeyWait, Rbutton, d T1
if Errorlevel != 1
Send, {ALTDOWN}{F4}{ALTUP}
return
Back to top
View user's profile Send private message
pajenn



Joined: 07 Feb 2009
Posts: 384

PostPosted: Sat Feb 21, 2009 12:44 am    Post subject: Reply with quote

I updated the code to close the child window/s first if one is present, and only then the parent, or everything at once if the mouse is over the main window's title bar area. For example, a double-right-click over a pdf document should now close the pdf instead of Adobe, Foxit, or whatever Reader is being used.

I find this more convenient than using menus, or clicking the little x at the upper-right corner to close xp windows and applications.

Code:
; close active window w/ dbl right-click
~Rbutton::
KeyWait, Rbutton
KeyWait, Rbutton, d T1
if Errorlevel != 1
  {  MouseGetPos,,,,control,1
      if control !=
      {  Send, {CTRLDOWN}{F4}{CTRLUP}
      }
      else
      {  Send, {ALTDOWN}{F4}{ALTUP}
      }
  }
return

_________________
Hardware: 1.8 GHz laptop with 4 GB ram, Windows XP/SP3
Software: Prevx, Privatefirewall, KeyScrambler.
Back to top
View user's profile Send private message
geor



Joined: 16 Jun 2008
Posts: 66

PostPosted: Sat Feb 21, 2009 12:20 pm    Post subject: Reply with quote

Thanks for posting this, pajenn,
& thanks for your script, evan -

I like to know this double click method for your usage,
& maybe for others.

also agree ! --->
Quote:
I find this more convenient than using menus, or clicking the little x at the upper-right corner to close xp windows and applications.


Anybody hear of "Fitts' law" ? apparently not the folks at Adobe,
who make the Close button of Acrobat smaller & smaller w/ each version!
Back to top
View user's profile Send private message
Display posts from previous:   
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