AutoHotkey Community

It is currently May 24th, 2012, 2:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: April 4th, 2006, 2:54 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 4th, 2006, 3:20 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2006, 6:38 pm 
Offline

Joined: March 19th, 2006, 5:52 am
Posts: 419
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 26th, 2006, 2:17 pm 
@TheIrishThug
Your script is very useful for me, thank you
(TheGermanThug)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 7:26 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 8:56 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 16th, 2007, 12:14 am 
Offline

Joined: November 27th, 2006, 3:06 pm
Posts: 69
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2007, 2:40 am 
Offline

Joined: October 11th, 2006, 5:27 am
Posts: 27
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 January 17th, 2007, 1:18 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2007, 7:03 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject: can someone make it?
PostPosted: December 26th, 2007, 2:29 am 
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


Report this post
Top
  
Reply with quote  
 Post subject: Mouse click
PostPosted: November 18th, 2008, 9:05 am 
Offline

Joined: November 17th, 2008, 2:21 pm
Posts: 5
Location: Norway
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 5th, 2010, 7:03 pm 
Offline

Joined: June 16th, 2008, 6:19 am
Posts: 66
Riccardo wrote:

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


i reply to this older thread,
because i was having this same problem also,
and want to maybe help others who wish to enjoy this functionality --->

i also use StrokeIt configed to activate w/ the RButton,
and this script doesn't interfere with that, or with any Rclick-drag.

********************

i use Ditto clipboard manager, and set Alt-C as my hotkey to activate it out of the systray.

i wanted to further bind Alt-C so i could activate it with a Rclick but not have the context menu messed up,
so i experimented with this script and changed the line

If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {

to the value of 100 ms instead of 500 ms, like so :

If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 100) {

thinking that it would require a faster double-click, and it does work!

so, if i only single click, the context menu comes up like normal,

but if i double-click (relatively) fast -
(obviously fine-tuned for my neuromuscular system 100 ms is fine),

then it sends Alt-C and fires up Ditto.

This greatly increases my productivity & enjoyment,
and i surely thank the people who contribute here on AHK :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Fantastic
PostPosted: December 17th, 2010, 12:12 am 
Offline

Joined: October 5th, 2009, 6:02 pm
Posts: 66
Location: southampton UK
This is a very helpful script , I modified it a little to use middle mouse button instead of right button . It gave me lots more functions with my 8 key game mouse.
Extra functions can also be routed to extra buttons on mouse ( Buttons 4 and 5)
:)

_________________
All`s well that ends well :-)
I will not appreciate sarcastic or personal insults in reply s to my posts . Those are the acts of cowards being brave from afar .If you cant be productive don't be destructive .


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], xXDarknessXx and 26 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