I keep trying to make this (simple) script but I never manage to get it to work. Could you help with making it?
I need a script that constantly spams Q and left-clicks every about 5 seconds without stopping at any time(except when I turn off the script).
Script that hits a key and left-clicks
- divanebaba
- Posts: 805
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: Script that hits a key and left-clicks
Try this.
Copy the the code into an empty text- or ahk-script-file and name it like you want. For text files you have to rename the ending from .txt to .ahk
Doubleclick to run script. Position your cursor, where you want to send the Q char. Press F6 to start spamming. Press F7 to stop spamming.Nice spammings from Germany
Copy the the code into an empty text- or ahk-script-file and name it like you want. For text files you have to rename the ending from .txt to .ahk
Doubleclick to run script. Position your cursor, where you want to send the Q char. Press F6 to start spamming. Press F7 to stop spamming.
Code: Select all
$F6:: ; starting script by pressing key F6
breakthis = ; empty this variable to loop further
loop
{
sleep 5000 ; sleeps 5000 ms
sendinput Q ; sending Q char
sendinput {LButton} ; sending left mouse button click
if (breakthis) ; needed to stop the script. Otherwise it could be difficult to stop the script
break
}
$F7:: ; stopping the script by pressing key F7
breakthis = 1
return
Einfach nur ein toller Typ.