1. #1

    Autohotkey Troubles with the CapsLock key

    Hello, Ive been trying to add the CapsLock key to my Autohotkey script that allows me to repeatedly send the same action until I let the key go (similar to the Logitech G13? and WoW Keyboards). 1,2,3,4,5 work correctly but I can't get CapsLock to work with similar code and I am not very savvy with Autohotkey. Can anyone help me out? Thanks ahead of time for anyone that replys.


    #ifWinActive World of Warcraft
    {
    $1::
    Loop
    {
    if not GetKeyState("1", "P")
    break
    Send 1
    sleep 1
    }
    return
    $2::
    Loop
    {
    if not GetKeyState("2", "P")
    break
    Send 2
    sleep 1
    }
    return
    $3::
    Loop
    {
    if not GetKeyState("3", "P")
    break
    Send 3
    sleep 1
    }
    return
    $4::
    Loop
    {
    if not GetKeyState("4", "P")
    break
    Send 4
    sleep 1
    }
    return
    $5::
    Loop
    {
    if not GetKeyState("5", "P")
    break
    Send 5
    sleep 1
    }
    return
    CapsLock:: ;this is where I start to have problems
    Loop
    {
    GetKeyState("CapsLock", "P")
    if state=D
    break
    Send {CapsLock}
    sleep 1
    }
    return
    }

    - - - Updated - - -

    Sorry, the formatting didn't go through, at the end where CapsLock:: starts is where I start having problems with this script.

  2. #2
    try something like this:

    CapsLock::
    Loop
    {
    GetKeyState, state, CapsLock, P
    if not state=D
    break
    Send {CapsLock}
    sleep 1
    }

  3. #3
    Deleted
    I'll just go ahead and point out that you're violating the ToS by doing that. One physical key event = one software key event per client.

  4. #4
    my bad, I didn't see the #ifwinactive at the start and thus didn't tie it to the fact he'd be looking for spamming hot keys!

    be aware that Blizzard have smart detection systems for checking your automatic hot keys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •