So in this case I am asking AHK to press shift twice with the following functions.
ShiftPress(delay){
send {Shift Down}
Sleep, delay
send {Shift Up}
Sleep, delay
}
ShiftPressTwice(delay){
ShiftPress(delay)
ShiftPress(delay)
}
For this set of keys (Not sure if this is the best way to iterate over a set of keys, only using examples I have found online)
w::
a::
s::
d::
1::
2::
3::
4::
5::
Space::
ShiftPressTwice(10)
while GetKeyState("Space")
{
Sleep, 10
}
Return
My thought is the above code is bit like switch case fall through, then it should call my function ShiftPressTwice(delay)
one time, then hit the GetKeyState(key)
loop and sleep then bail. What happens is this seems to run in a endless loop. Please let me know if you have any questions.