Do you want to make a script where a, s, OR d start up that code? It would be like this:
Code: Select all
a::
s::
d::
If ( i = 1 ) {
; rest of code
But, you're saying to do a, s, AND d, yeah? That's a bit trickier, but you can try this:
Code: Select all
#If GetKeyState ("a","p")
s & d::
If ( i = 1 ) {
; rest of code
But the problem is that requires a to be pressed first (or maybe pressing s, then a, then d works). s & d there are a custom
hotkey.
For the order to not matter, this should work, however... it might trigger multiple threads, I'm not so sure.
Code: Select all
a::
s::
d::
KeyWait, a, d
KeyWait, s, d
KeyWait, d, d ; the d in all three mean "Down"
If !GetKeyState("a","p") || !GetKeyState("s","p") || !GetKeyState("d","p")
return ; all three keys are not currently held down
; rest of code
The ! is the logical-not operator. The || is the OR
operator.
But, thinking it over, it should be viable to do the above with only a single
a:: hotkey (remove
s:: and
d::), as if you press a last, it will still active the hotkey and the KeyWaits will be satisfied.
You may find some trouble using KeyWait if there is no TimeOut parameter, so consider adding one. An example of a 2 second timeout is this:
KeyWait, a, d T2.