Attempting to make a clicking script that holds down a button and releases, the second part is much harder!
I need the LMB to be held down for 200ms after the function clicker() has been called 20 times, I'm not sure where or how to change that. Anyone got any ideas?
^#LButton:: {
clicker()
SetTimer(clicker, 400)
}
;Calls clicker to hold lmb for 400ms
^#RButton:: {
SetTimer(clicker, 0)
release()
}
;Removes timer to shut down the script
clicker() {
release()
Click('Down')
}
;if LMB is not activated, holds LMB down for the set time
release() {
if GetKeyState('LButton')
Click('Up')
sleep(130)
}
;if LMB is held down by script, releases it for 130ms before clicker is called again