I was looking for a way to cycle thru keys using spacebar. After some google search I found this code and it works. Modified it to work with spacebar.
One thing I can't figure out is how to skip 3 and immediately go to 4 key because in 3dsmax I don't use the 3 key. I tried editing the code and testing but can't figure it out. Any help appreciated.
Original
Code: Select all
$1:: ; $ blocks the hotkey form triggering itself
key++
if key = 1
Send, 1
else if key = 2
Send, 2
else if key = 3
Send, 3
else if key = 4
{
Send, 4
key = 0
}
return
Modified
Code: Select all
#IfWinActive, ahk_class 3DSMAX
Space::1
$Space:: ; $ blocks the hotkey form triggering itself
key++
if key = 1
Send, 1
else if key = 2
Send, 2
else if key = 3
Send, 3
else if key = 4
{
Send, 4
key = 0
}
return