I works great but I was wondering if someone could help me modify one of these to toggle BOTH left click and right click, but still cancel both when I reuse the hotkey or left click. Any help would be appreciated. Cheers!Hallo,
perhaps:
Code: Select all - Toggle Line numbers
~LButton::hold = ; switch off hold flag
!+u up:: ; TOGGLE MOUSE
if hold:= !hold ; toggle hold flag
Click down ; presses the left button
else
Click up ; releases the left button
return
or shorter:
Code: Select all - Toggle Line numbers
~LButton::hold = ; switch off hold flag
!+u up::Click,% (hold:=!hold)?"down":"up" ; TOGGLE MOUSE
Asking for help modifying left click toggle Topic is solved
-
- Posts: 2
- Joined: 20 Oct 2021, 08:45
Asking for help modifying left click toggle
Hello, I've been using this left click toggle script that holds the LButton but cancels when I reuse the hotkey OR left click:
Re: Asking for help modifying left click toggle
Code: Select all
~LButton::
~RButton::hold := False
!+u up::Send % (hold := !hold) ? "{LButton down}{RButton down}" : "{RButton up}{LButton up}"
-
- Posts: 2
- Joined: 20 Oct 2021, 08:45
Re: Asking for help modifying left click toggle
Thanks for this, it works but when I cancel it with a left click, my left click then clicks both the LButton and RButton at the same time until I do a right click, and then it works normally. I hope that makes sense. Is there a way to around this?mikeyww wrote: ↑20 Oct 2021, 09:54Code: Select all
~LButton:: ~RButton::hold := False !+u up::Send % (hold := !hold) ? "{LButton down}{RButton down}" : "{RButton up}{LButton up}"
Re: Asking for help modifying left click toggle Topic is solved
Perhaps:
Code: Select all
!+u up::
If hold := !hold {
Send {LButton down}{RButton down}
SoundBeep, 1500
} Else Gosub, ~LButton Up
Return
#If hold
~LButton Up::
~RButton Up::
Send {LButton up}{RButton up}
Send {Esc} ; OK to delete
hold := False
SoundBeep, 1000
Return
#If