extra "button down" reported by keyhistory

Get help with using AutoHotkey and its commands and hotkeys
stuffedtiger
Posts: 3
Joined: 04 Apr 2019, 14:20

extra "button down" reported by keyhistory

04 Apr 2019, 14:33

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?
User avatar
sinkfaze
Posts: 609
Joined: 01 Oct 2013, 08:01

Re: extra "button down" reported by keyhistory

04 Apr 2019, 15:39

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.
stuffedtiger
Posts: 3
Joined: 04 Apr 2019, 14:20

Re: extra "button down" reported by keyhistory

09 Apr 2019, 18:11

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.

Return to “Ask For Help”

Who is online

Users browsing this forum: aifritz, Bing [Bot], Google [Bot] and 158 guests