tytidbit wrote:Welcome to ahk, Geff T
i have had to give in and ask a Q here https://autohotkey.com/boards/viewtopic ... 827#p85827but i wont go to OT
tytidbit wrote:Welcome to ahk, Geff T
and also a link explaining.Helpful links:
1. Don't know how to use these? READ THIS: https://autohotkey.com/docs/Tutorial.htm
2. AHK not working in your game/program? READ THIS: https://autohotkey.com/boards/viewtopic.php?f=7&t=11084
3. List of keys to use as HOTKEYS (the line with "::"): https://autohotkey.com/docs/KeyList.htm
...
Code: Select all
*Space::
Send {Space}
Sleep 250
Return
landfillbaby wrote:works for me (holding space presses it exactly 4 times per second), no need for a loop, i guess my keyboard works weird?Code: Select all
*Space:: Send {Space} Sleep 250 Return
ok, i've just checked, it still works when the input isn't in the outputGreatGazoo wrote:could it be that the hotkey and the key sent being the same key, that it's creating a loop on it's own
Code: Select all
Space::
Send hello
Sleep 250
Return
landfillbaby wrote:ok, i've just checked, it still works when the input isn't in the outputGreatGazoo wrote:could it be that the hotkey and the key sent being the same key, that it's creating a loop on it's ownthis would probably be a bad thing if i wasn't trying to make a loop anywayCode: Select all
Space:: Send hello Sleep 250 Return
Code: Select all
^j::
SoundBeep, 525, 100
Random, rand, 1, 10000
send, %rand% {enter}
return
Code: Select all
SetKeyDelay -1
t=
Space Up::t=
Space::
t=1
While t {
Send % " "
Sleep 250
}
Return
If you want to use a spammer for a key, just use this. It's small, simple, and can be used anywhere in a script, not just a hotkey.landfillbaby wrote:it turns out it's tied to the physical keyboard's auto-repeat feature, and is interrupted by other keypresses
i used this instead:it's basically just the toggle method but without the threading problemCode: Select all
SetKeyDelay -1 t= Space Up::t= Space:: t=1 While t { Send, % " " Sleep, 250 } Return
How do you turn off the first one? Sorry, I'm new here.tidbit wrote: ↑17 Dec 2015, 14:33Here are 2 of the most commonly asked things (like, 5+ times a day). I'm not here to explain them as you probably don't care (but if you do care, ask below).
Choose which one you want. If you need to modify it, see "Helpful links" below.
Please try changing stuff yourself before asking. We appreciate any effort.
1. Press-and-Hold: Send or click while a button or key is held down2. Toggle: Press once to activate, press again to turn it offCode: Select all
setKeyDelay, 50, 50 setMouseDelay, 50 $~lbutton:: while (getKeyState("lbutton", "P")) { send, {lbutton} sleep, 100 } return
shitcake96 wrote: ↑02 Mar 2021, 12:06How do you turn off the first one? Sorry, I'm new here.tidbit wrote: ↑17 Dec 2015, 14:33Here are 2 of the most commonly asked things (like, 5+ times a day). I'm not here to explain them as you probably don't care (but if you do care, ask below).
Choose which one you want. If you need to modify it, see "Helpful links" below.
Please try changing stuff yourself before asking. We appreciate any effort.
1. Press-and-Hold: Send or click while a button or key is held down2. Toggle: Press once to activate, press again to turn it offCode: Select all
setKeyDelay, 50, 50 setMouseDelay, 50 $~lbutton:: while (getKeyState("lbutton", "P")) { send, {lbutton} sleep, 100 } return
Code: Select all
state:=true
$f14::
state:=!state
#if (state==true)
*LShift::return
return
Return to “Tips and Tricks (v1)”
Users browsing this forum: No registered users and 38 guests