 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
pajenn
Joined: 07 Feb 2009 Posts: 384
|
Posted: Tue Feb 10, 2009 7:05 pm Post subject: Hotkeys for double-clicks? (right mouse button) |
|
|
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 |
|
 |
evan Guest
|
Posted: Tue Feb 10, 2009 7:20 pm Post subject: |
|
|
?
| 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
|
Posted: Tue Feb 10, 2009 7:45 pm Post subject: |
|
|
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 |
|
 |
pajenn
Joined: 07 Feb 2009 Posts: 384
|
Posted: Sat Feb 21, 2009 12:44 am Post subject: |
|
|
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 |
|
 |
geor
Joined: 16 Jun 2008 Posts: 66
|
Posted: Sat Feb 21, 2009 12:20 pm Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|