 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Riccardo Guest
|
Posted: Tue Apr 04, 2006 1:54 pm Post subject: |
|
|
| Laszlo wrote: | If you only want to use double right-click, it is much simpler. I use the following script to pop up a menu with my personal data I have to enter often into fields on Web forms, but you can use it for anything else. It does not affect right-dragging. | Code: | ~RButton::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
Sleep 200 ; wait for right-click menu, fine tune for your PC
Send {Esc} ; close it
MsgBox OK ; your double-right-click action here
}
Return |
|
This script disables the right button mouse context menu.
That shouldn't be.
How can I use the right mouse button double click without loosing the context menu?
cu
Richard |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue Apr 04, 2006 2:20 pm Post subject: |
|
|
1) The comments are explicit...
2) If you single right click, the context menu is here.
3) If you double right click, it is to perform some special function (like a hotkey), so the original function of the right click (context menu) must be disabled. Or so I think. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
TheIrishThug
Joined: 19 Mar 2006 Posts: 381
|
Posted: Tue Apr 25, 2006 5:38 pm Post subject: |
|
|
Found this script and can't get enough of the copy/paste with the right button. Then I realized it was kinda silly to exclude cut from the excitement that is mouse functions. I opted for a two button hold instead of a triple click because I'm impatient and don't want to wait for the right click menu.
| Code: | #SingleInstance force
Rbutton::
keywait, rbutton, t0.2
if errorlevel = 1
{
;
;'press-n-hold'
; If middle button is pressed, Cut
; Else Copy
;
if GetKeyState("mbutton")
send, ^x
else
send, ^c
return
}
else
keywait, rbutton, d, t0.2
if errorlevel = 0
{
;
; 'double click'
;
send, ^v
return
}
else
;
; regular single click
;
mouseclick, right
return |
|
|
| Back to top |
|
 |
robiandi Guest
|
Posted: Wed Apr 26, 2006 1:17 pm Post subject: |
|
|
@TheIrishThug
Your script is very useful for me, thank you
(TheGermanThug) |
|
| Back to top |
|
 |
rdk Guest
|
Posted: Mon Jan 15, 2007 6:26 pm Post subject: |
|
|
Finally! I have been so much looking for closing windows on double-right-click. And now it can be done!
This is the only thing I am missing from Lotus Notes behavior - closing window on mouse right double-click.
So I am using this code:
| Code: |
~RButton::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
Sleep 200 ; wait for right-click menu, fine tune for your PC
Send {Esc} ; close it
Send !{F4} ; close window ALT-F4
}
Return
|
Thanks a lot. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Mon Jan 15, 2007 7:56 pm Post subject: |
|
|
The following script should be a little more robust, but much depends on the applications you are running. Choose the one which works better for you. | Code: | ~RButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
ControlSend,,{ESC}, ahk_id %ID%
WinClose ahk_id %ID%
}
Else WinGet ID, ID, A
Return |
|
|
| Back to top |
|
 |
sabot7726
Joined: 27 Nov 2006 Posts: 22
|
Posted: Mon Jan 15, 2007 11:14 pm Post subject: Add a buffer for cases of accidental drag? |
|
|
I was playing around with shimanov's version of this as I think it will add some functionality to an app I use all the time. The problem is, most people who are right clicking will also inadvertanatly move the mouse a couple pixels in any direction.
The way this script is right now, it picks that up as a "right click and drag" function, even if someone is simply trying to double click. Is there any way to add a 5 or 10 pixel buffer in any direction without flagging it as a drag operation? |
|
| Back to top |
|
 |
ZeLen1y
Joined: 11 Oct 2006 Posts: 7
|
Posted: Tue Jan 16, 2007 1:40 am Post subject: |
|
|
Some my functions
| Code: | VarBetween(Var, Low, High) {
If Var between %Low% and %High%
Return, True
}
DoubleClickTime() {
Return, DllCall("GetDoubleClickTime")
}
KeyIsDoublePressed() {
If (A_PriorHotKey = A_ThisHotKey and VarBetween(A_TimeSincePriorHotkey, "100", DoubleClickTime()))
Return, A_TimeSincePriorHotkey
}
|
Last edited by ZeLen1y on Wed Jan 17, 2007 12:18 am; edited 2 times in total |
|
| Back to top |
|
 |
rdk Guest
|
Posted: Tue Jan 16, 2007 6:03 pm Post subject: |
|
|
| Laszlo wrote: | The following script should be a little more robust, but much depends on the applications you are running. Choose the one which works better for you. | Code: | ~RButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
ControlSend,,{ESC}, ahk_id %ID%
WinClose ahk_id %ID%
}
Else WinGet ID, ID, A
Return |
|
Thank you Laszlo. I just updated that a little bit in order to close tabs in Firefox instead of the whole window...
| Code: |
~RButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
ControlSend,,{ESC}, ahk_id %ID%
WinGetClass class, A
If (class = "MozillaUIWindowClass") {
ControlSend,,^w, ahk_id %ID%
}
Else WinClose ahk_id %ID%
}
Else WinGet ID, ID, A
Return
|
|
|
| Back to top |
|
 |
Funnyjunk Guest
|
Posted: Wed Dec 26, 2007 1:29 am Post subject: can someone make it? |
|
|
Can someone make it for closing opera tabs please?? the shortcut to close the tabs is CTRL+W. I am not a programer but the using of right button is very usefull. Thnaks a lot, hope you enjoy too
| rdk wrote: | | Laszlo wrote: | The following script should be a little more robust, but much depends on the applications you are running. Choose the one which works better for you. | Code: | ~RButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
ControlSend,,{ESC}, ahk_id %ID%
WinClose ahk_id %ID%
}
Else WinGet ID, ID, A
Return |
|
Thank you Laszlo. I just updated that a little bit in order to close tabs in Firefox instead of the whole window...
| Code: |
~RButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
ControlSend,,{ESC}, ahk_id %ID%
WinGetClass class, A
If (class = "MozillaUIWindowClass") {
ControlSend,,^w, ahk_id %ID%
}
Else WinClose ahk_id %ID%
}
Else WinGet ID, ID, A
Return
|
|
|
|
| Back to top |
|
 |
Livonet
Joined: 17 Nov 2008 Posts: 5 Location: Norway
|
Posted: Tue Nov 18, 2008 8:05 am Post subject: Mouse click |
|
|
| I am trying to find a routine that can give me an idea of how to link a routine that I already have, by clicking with the leftbutton of the mouse in a specific position of a window, I dont want the routine to start just clicking because it will be a disaster. Someone that can help me..! Thanks |
|
| 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
|