After a l/rbutton hotkey, button stops working (1x/2x/drag plz)

Get help with using AutoHotkey and its commands and hotkeys
gibenedek
Posts: 29
Joined: 20 Sep 2020, 19:51

After a l/rbutton hotkey, button stops working (1x/2x/drag plz)

17 Nov 2020, 17:25

The stupid mouse problem...Its like im sitting here, 2 1/2ish months under my belt, beginning to mess with gui boxes and lists & making good progress. And the STUPID MOUSE HOTKEY IS LAUGHING IN MY FACE. ITS A HOTKEY! I can make a folder copy to another upon anything entering it, and upload to dropbox...but I cant mouse hotkey.

I found a fix once, involving a toggle somehow. I lost the script :(

Yeah ya know that problem where if you assign rbutton to a function, it for some reason stays down (im assuming) therefore making the button broken until logout? I cant be the only one. I need this fixed and ive looked forever for that ONE script that ONE time that I lost.

To elaborate, I want to make double right click do something. Sound simple...ITS NOT. I managed to get the double click and single click to work (easy cheesy) and it seems to keep working...but I lose drag functionallity. Im going crazy, its just such a simple idea. But it fails me every time. Heres what I got, plz help, youre the best #1 pro scriptor for lyfe best in the league Grandmaster ty

Code: Select all





Rbutton::goto rbutton2xclick

Rbutton2xclick:
;
;it gives you half a second to either complete the double click
;or to complete the press-and-hold cycle. If neither happens
;you get a normal single click response.
;
keywait, rbutton, t0.5
if errorlevel = 1
{
;
;This registers a 'press-n-hold' on the right mouse button.
;ADD YOUR FUNCTIONS HERE, for instance
;you could do a control-n to open a new IE window, as below
MouseClick, right,,,,,d   <----------------------------------------------------------------THIS

}
else
	keywait, rbutton, d, t0.5
if errorlevel = 0
{
;
;this registers a 'double click' on the right mouse button.
;add your functions here, for instance I use it below
;to do a shift-left click which opens a link in its own window
;
msgbox 2xclick
return
}
else 
;
;if neither of the above heppen, send a regular single click
;
	mouseclick, right
return

rbutton up::MouseClick,right,,,,,u <---------------------------------------------------AND THIS  = My best guess before I gave up



User avatar
mikeyww
Posts: 5237
Joined: 09 Sep 2014, 18:38

Re: After a l/rbutton hotkey, button stops working (1x/2x/drag plz)

17 Nov 2020, 19:08

Code: Select all

RButton::
KeyWait, %A_ThisHotkey%, T0.2    ; Wait for release
If ErrorLevel {                  ; Button was HELD instead
 SoundBeep, 1500, 20
 Send Held `
 Return
}
KeyWait, %A_ThisHotkey%, D T0.2  ; Wait for second press
If Errorlevel {                  ; Second press did not occur = REGULAR click
 SoundBeep, 1200, 20
 Send Regular `
 Return
}
SoundBeep, 900, 20               ; Second press occurred = DOUBLE-click
Send Double `
Return

Return to “Ask For Help”

Who is online

Users browsing this forum: hasantr, Xeo786 and 45 guests