Disable Left Mouse Button while script is active? BlockInput blocks too much.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Rantonhageton
Posts: 57
Joined: 26 Jul 2016, 21:31

Disable Left Mouse Button while script is active? BlockInput blocks too much.

12 Aug 2017, 01:36

I want to disable Left Mouse Button while this script, or hotkey, is active:

$XButton2::
Sleep, 10
Send, {7}
Sleep, 350
Return

Anyone know how to do this? I don't want to disable my whole keyboard or mouse with BlockInput.
Rohwedder
Posts: 7681
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Disable Left Mouse Button while script is active? BlockInput blocks too much.

12 Aug 2017, 01:53

Hallo,
try:

Code: Select all

$XButton2::
	Hotkey, *LButton, Return
	Sleep, 10
	Send, {7}
	Sleep, 350
	Hotkey, *LButton, Off
Return:
Return
Rantonhageton
Posts: 57
Joined: 26 Jul 2016, 21:31

Re: Disable Left Mouse Button while script is active? BlockInput blocks too much.

12 Aug 2017, 17:40

Rohwedder wrote:Hallo,
try:

Code: Select all

$XButton2::
	Hotkey, *LButton, Return
	Sleep, 10
	Send, {7}
	Sleep, 350
	Hotkey, *LButton, Off
Return:
Return
Works perfectly, thanks!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 136 guests