Press Left click while holding spacebar
Posted: 27 Sep 2021, 16:08
I'm looking to have it constantly click Left Mouse while holding spacebar inside of a specific app. I need it only in that app because when out of the app I need to use spacebar like normal and trying not to toggle on and off. Here's the code I have. It does spam left click, but then couldn't get it to stop. I got the original code from here: https://autohotkey.com/board/topic/41742-spamming-left-clicks-when-mouse-button-hold-down/, however instead of "while mouse held down" I need "while space held down". I got the title stuff from here: https://www.autohotkey.com/docs/commands/WinGetActiveTitle.htm
Current code:
Current code:
Code: Select all
$Space::
WinGetActiveTitle, Title
Loop
{
if not GetKeyState("Space", "P") and Title = "AppName"
break
Click
}
return