How to avoid LButton (or Click) inside another Hotkey? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rdllngr
Posts: 54
Joined: 22 Sep 2017, 09:39

How to avoid LButton (or Click) inside another Hotkey?

15 May 2018, 18:41

Is there any way to disable the LButton before this label, and re-enable it after it finishes?

I have this label that is working properly in Photoshop. But when I click the mouse (unintentionally), unexpected things happen. Any ideia?

Code: Select all

Color_Wheel:
; HOW TO DISABLE LBUTTON HERE IN THIS LINE? <---------------
Suspend, On
SendInput, b
KeyWait, %Key%, D
Tip("Color Wheel", 60000)
Send {Alt Down}{Shift Down}
MouseClick, Right,,, 1, 0, D
Send {Alt Up}{Shift Up}
Loop
	{
	Sleep, 10
	GetKeyState, State, %Key%, P
	if State = U
		break
	}
MouseClick, Right,,, 1, 0, U
Suspend, Off
; AND HOW TO REACTIVATE LBUTTON HERE? <---------------
Reload
return
Rohwedder
Posts: 7645
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to avoid LButton (or Click) inside another Hotkey?  Topic is solved

16 May 2018, 01:55

Hallo,
perhaps (untested):

Code: Select all

Color_Wheel:
HotKey, LButton, Return, On
Suspend, On
SendInput, b
KeyWait, %Key%, D
;Tip("Color Wheel", 60000)
Send {Alt Down}{Shift Down}
MouseClick, Right,,, 1, 0, D
Send {Alt Up}{Shift Up}
Loop
	{
	Sleep, 10
	GetKeyState, State, %Key%, P
	if State = U
		break
	}
MouseClick, Right,,, 1, 0, U
Suspend, Off
HotKey, LButton, Return, Off
Reload
return
Return:
	Suspend, Permit
Return
rdllngr
Posts: 54
Joined: 22 Sep 2017, 09:39

Re: How to avoid LButton (or Click) inside another Hotkey?

16 May 2018, 07:16

PERFECT! Thank you very much, Rohwedder! ^o^

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 350 guests