Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[WoW game] Modifier+Key to spam Modifier+Key on hold


  • Please log in to reply
1 reply to this topic
Henyte
  • Members
  • 1 posts
  • Last active: Oct 28 2015 04:15 PM
  • Joined: 28 Oct 2015

I play World of Warcraft. I am using AHK for a while and can't solve this:

 

W, A, D keys are keybound as movement keys in-game to control my character to go Forward, Strafe Left and Strafe Right.

 

I have casting spells keybound on Shift+W, Shift+A, Shift+D and when I press one of that combinations I start casting, but the problem occur when I unpress "Shift" while in the cast when I still hold one of "W" / "A" / "D" keys and then my chararacter starts to move & stop by doing very short micro steps in the loop, instead of just breaking the loop & spell casting and running like normaly.

 

So whenever I press "shift+d" (casting a spell) and unpressing "shift" while in the cast i want instantly strafe to the right w/o any stops.

 

*** IF THE YOU DID NOT UNDERSTAND WHAT I WANT I CAN UPLOAD VIDEO, JUST ASK. :)

*** IF THE YOU DID NOT UNDERSTAND WHAT I WANT I CAN UPLOAD VIDEO, JUST ASK. :)

*** IF THE YOU DID NOT UNDERSTAND WHAT I WANT I CAN UPLOAD VIDEO, JUST ASK. :)

 

Lines which **** my movement when modifier is released while casting:

$*^w::RepeatPressBlind( "w" )
$*+w::RepeatPressBlind( "w" )
$*^a::RepeatPressBlind( "a" )
$*+a::RepeatPressBlind( "a" )
$*^d::RepeatPressBlind( "d" )
$*+d::RepeatPressBlind( "d" )

Full script I use is here:

#InstallKeybdHook

isInUse = 1

RepeatPress( key ){
    global isInUse
    loop {
        if not GetKeyState( key, "P" ){
            break
        }
       if not isInUse  {
            Send, {%key%}
        }
        sleep 1
    }
    return
}

RepeatPressCtrl( key ){
    global isInUse = 1
    loop {
        if not GetKeyState( key, "P" ){
            isInUse = 0
            break
        }
        if GetKeyState( "Ctrl", "P" ){
            Send, ^{%key%}
        }
        sleep 1
    }
    return
}

RepeatPressShift( key ){
    global isInUse = 1
    loop {
        if not GetKeyState( key, "P" ){
            isInUse = 0
            break
        }
        if GetKeyState( "Shift", "P" ){
            Send, +{%key%}
        }
        sleep 1
    }
    return
}

RepeatPressBlind( key ){
    loop {
        if not GetKeyState( key, "P" ){
            break
        }
        Send, {Blind}{%key%}
        sleep 1
    }
    return
}

RepeatPressRedirect( holdKey, sendKey ){
    loop {
        if not GetKeyState( holdKey, "P" ){
            break
        }
        Send, {Blind}{%sendKey%}
        sleep 1
    }
    return
}

#IfWinActive World of Warcraft
Pause::Suspend
*`::RepeatPressBlind( "``" )
*/::RepeatPressBlind( "/" )
*f1::RepeatPressBlind( "f1" )
*f2::RepeatPressBlind( "f2" )
*f3::RepeatPressBlind( "f3" )
*f4::RepeatPressBlind( "f4" )
*f7::RepeatPressBlind( "f7" )
*f8::RepeatPressBlind( "f8" )
*f10::RepeatPressBlind( "f10" )
*f11::RepeatPressBlind( "f11" )
*f12::RepeatPressBlind( "f12" )
1::RepeatPressBlind( "1" )
*2::RepeatPressBlind( "2" )
*3::RepeatPressBlind( "3" )
*4::RepeatPressBlind( "4" )
*5::RepeatPressBlind( "5" )
*6::RepeatPressBlind( "6" )
*g::RepeatPressBlind( "g" )
*q::RepeatPressBlind( "q" )
*e::RepeatPressBlind( "e" )
*f::RepeatPressBlind( "f" )
*h::RepeatPressBlind( "h" )
*r::RepeatPressBlind( "r" )
*t::RepeatPressBlind( "t" )
*z::RepeatPressBlind( "z" )
*x::RepeatPressBlind( "x" )
*c::RepeatPressBlind( "c" )
*b::RepeatPressBlind( "b" )
*y::RepeatPressBlind( "y" )
*v::RepeatPressBlind( "v" )
*n::RepeatPressBlind( "n" )
*s::RepeatPressBlind( "s" )
$*^p::RepeatPressBlind( "p" )
$*+p::RepeatPressBlind( "p" )
$*^Tab::RepeatPressBlind( "Tab" )
$*+Tab::RepeatPressBlind( "Tab" )
$*^w::RepeatPressBlind( "w" )
$*+w::RepeatPressBlind( "w" )
$*^a::RepeatPressBlind( "a" )
$*+a::RepeatPressBlind( "a" )
$*^d::RepeatPressBlind( "d" )
$*+d::RepeatPressBlind( "d" )


ajc1981
  • Members
  • 14 posts
  • Last active: Nov 16 2015 07:59 PM
  • Joined: 31 Aug 2015

Pause::Suspend in your script could be the problem trying using a toggle off key