1. How do i make it end always on "Send, q{Click}" after i release the key?
2. Any way to make it faster without freezing the computer? Already tried without "Sleep" but didnt success.
3. Sometimes it keeps going after i release the key, realised some times is happening when pressing other keys or clicking while holding the script key also when double tapping it, how could i fix it?
4. Wanted to add more keys with the same function as the "q" one without repeating the same code but not sure how to structure it, also general code optimization tips are welcome.
Thanks in advance!
Code: Select all
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , H
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
<::Suspend
$q::
While GetKeyState("q","P"){
Send, q{Click}
Sleep 1
}
return