Hold 1 key down

Get help with using AutoHotkey and its commands and hotkeys
H4TE
Posts: 2
Joined: 18 Nov 2016, 22:58

Hold 1 key down

18 Nov 2016, 23:08

Sorry guys. I've googled for over 2 hours, and not a single "hold key down" script works out of the 30-40 i've tried.... "Send {space down}" does not work.


What I am trying to do, is simply hold 1 key down, non stop so it auto-loots aka picks up what ever I am doing in game. Until I turn the damn thing off :lolno:
H4TE
Posts: 2
Joined: 18 Nov 2016, 22:58

Re: Hold 1 key down

18 Nov 2016, 23:37

Finally found one that works. Sorry... After that long search lol. If anyone else comes across this issue...


#MaxThreadsPerHotkey 2

$F2::
Toggle := !Toggle
while Toggle
{
Send, {space Down}
Sleep, 50
Send, {space Up}
}
return



F2 will toggle spacebar spam.
hugin
Posts: 15
Joined: 17 Aug 2016, 01:33

Re: Hold 1 key down

19 Nov 2016, 17:14

Hello!
It should be tons of scripts and code out there to fit the need for what you are trying to achieve :)

What you have found is a basic toggle script and are to find all over the Interwebz, including the old and the new site of AHK.
Many times, especially when new to a subjects like AHK, it can be hard to know what too look for, so here is a link to a small repository of useful starter scripts that can be handy to learn and implement in to your scripts. It might not be exact what you are looking for in term of what your goal is, but it is a good start for sure.
It also include your findings for the toggle script.

Good luck!

Return to “Ask For Help”

Who is online

Users browsing this forum: assak123, Chunjee, freespacing, malcev, vsub and 145 guests