Page 1 of 1

extra "button down" reported by keyhistory

Posted: 04 Apr 2019, 14:33
by stuffedtiger
i have a simple script to spam-click in chrome when LButton is held down.

the entirety of the script:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Suspend, On
Return

*MButton::
Suspend
Return

#If WinActive("ahk_class Chrome_WidgetWin_1")

*LButton::
While (GetKeyState("LButton", "P"))
{
  MouseClick
  Sleep, 2
}
Return
sometimes after i release the physical mouse button, AHK will continue to spam-click. i checked the key history log and when this happens there is an extra "button down" event being registered.
any thoughts?

Re: extra "button down" reported by keyhistory

Posted: 04 Apr 2019, 15:39
by sinkfaze
I'm going to move this to Ask for Help first to confirm that there is a bug, if we can confirm it then we'll move to Bug Reports.

Re: extra "button down" reported by keyhistory

Posted: 09 Apr 2019, 18:11
by stuffedtiger
so i did some testing and modified my script to use SendEvent instead of SendInput with SetMouseDelay, -1. so far the reported issue has yet to occur.