i key to toggle 4 others
Posted: 05 Nov 2018, 14:42
I know, I know.... this has been asked a hundred times and all the threads I find, don't quite work for me I am playing
Marvel Ultimate Alliance and has the option of swapping between all four characters directly, but would like to use
T to just cycle through all four keys mapped to J ~ K ~ L ~ H
I have the following script, courtesy of Xtra, that will toggle between two keys:
-------------------------------------------------------------------------------------------------------------------
$t::SendToggler("j","k")<---------------------- would like to add 2 more keys, but my attempts have failed
SendToggler(key1,key2,dur:=100)
{
static key
key := key=key1 ? key2 : key1
Send, {%key% Down}
Sleep dur
Send, {%key% Up}
}
return
--------------------------------------------------------------------------------------------------------------------
Works fantastic for two keys.... but need 4. I have tried to modify this script to add a couple more keys, but
have been unsuccessful.
Tinkering around with ideas, this will cycle through all 4 characters, but....... well, take a look
-------------------------------------------------------------------------------------------------------------------------
t::
Send {j down}
Sleep, 1000
Send {j up}
sleep, 50
Send {k down}
Sleep, 1000
Send {k up}
Sleep, 50
Send {l down}
Sleep, 1000
send {l up}
Sleep, 50
Send {h down}
Sleep, 1000
Send {h up}
KeyWait, t
Send {j up}{k up}{l up}{h up}
return
---------------------------------------------------------------------------------------------------------------------------
The modestly trained AHK eye will see the same thing I did when I made it, but wanted to see the result "in game" anyway.
Sho nuff.... just like I figured, it goes through all 4 characters then stops where I started
Any help would be appreciated
Marvel Ultimate Alliance and has the option of swapping between all four characters directly, but would like to use
T to just cycle through all four keys mapped to J ~ K ~ L ~ H
I have the following script, courtesy of Xtra, that will toggle between two keys:
-------------------------------------------------------------------------------------------------------------------
$t::SendToggler("j","k")<---------------------- would like to add 2 more keys, but my attempts have failed
SendToggler(key1,key2,dur:=100)
{
static key
key := key=key1 ? key2 : key1
Send, {%key% Down}
Sleep dur
Send, {%key% Up}
}
return
--------------------------------------------------------------------------------------------------------------------
Works fantastic for two keys.... but need 4. I have tried to modify this script to add a couple more keys, but
have been unsuccessful.
Tinkering around with ideas, this will cycle through all 4 characters, but....... well, take a look
-------------------------------------------------------------------------------------------------------------------------
t::
Send {j down}
Sleep, 1000
Send {j up}
sleep, 50
Send {k down}
Sleep, 1000
Send {k up}
Sleep, 50
Send {l down}
Sleep, 1000
send {l up}
Sleep, 50
Send {h down}
Sleep, 1000
Send {h up}
KeyWait, t
Send {j up}{k up}{l up}{h up}
return
---------------------------------------------------------------------------------------------------------------------------
The modestly trained AHK eye will see the same thing I did when I made it, but wanted to see the result "in game" anyway.
Sho nuff.... just like I figured, it goes through all 4 characters then stops where I started
Any help would be appreciated