Close
Showing results 1 to 1 of 1
  1. #1

    Default AutoHotkey issues

    Hi,

    I've been using the following script for dualboxing leveling characters:

    Code:
    ClonesPush(strKeys){
        global WowWinId1
        global WowWinId2
        global WowWinId3
        global WowWinId4
        global WowWinId5
        IfWinNotActive, ahk_id %WowWinId1%
            ControlSend, , %strKeys%, ahk_id %WowWinId1%
        IfWinNotActive, ahk_id %WowWinId2%
            ControlSend, , %strKeys%, ahk_id %WowWinId2%
        IfWinNotActive, ahk_id %WowWinId3%
            ControlSend, , %strKeys%, ahk_id %WowWinId3%
        IfWinNotActive, ahk_id %WowWinId4%
            ControlSend, , %strKeys%, ahk_id %WowWinId4%
        IfWinNotActive, ahk_id %WowWinId5%
            ControlSend, , %strKeys%, ahk_id %WowWinId5%
    }
    
    
    ;Grab unique window ID's
    WinGet, WowWinId, List, World of Warcraft
    
    
    ; *******************************
    ; *** Only if WoW is in focus ***
    ; *******************************
    #IfWinActive, World of Warcraft
    
    
    ;*** Special Functions ***
    
    
    ; *** Makes clones follow main ***
    ^-::ClonesPush("{- down}{- up}")
    
    
    ; *** Makes clones assist main ***
    ^=::ClonesPush("{= down}{= up}")
    
    
    ; *** Makes clones jump with main ***
    ~Space::ClonesPush("{Space down}{Space up}")
    
    
    ; *** Suspends HotKeys while typing on main ***
    ~Enter::Suspend, Toggle
    ~r::Suspend, On
    ~Escape::Suspend, Off
    
    
    ~w::ClonesPush("{- down}{- up}")
    ~a::ClonesPush("{- down}{- up}")
    ~s::ClonesPush("{- down}{- up}")
    ~d::ClonesPush("{- down}{- up}")
    
    
    ; *******************
    ; *** Hotbars 1-0 ***
    ; *******************
    ~1::ClonesPush("{= down}{= up}{1 down}{1 up}")
    ~2::ClonesPush("{= down}{= up}{2 down}{2 up}")
    ~3::ClonesPush("{= down}{= up}{3 down}{3 up}")
    ~4::ClonesPush("{= down}{= up}{4 down}{4 up}")
    ~5::ClonesPush("{= down}{= up}{5 down}{5 up}")
    ~6::ClonesPush("{= down}{= up}{6 down}{6 up}")
    ~7::ClonesPush("{= down}{= up}{7 down}{7 up}")
    ~8::ClonesPush("{= down}{= up}{8 down}{8 up}")
    ~9::ClonesPush("{= down}{= up}{9 down}{9 up}")
    ~0::ClonesPush("{= down}{= up}{0 down}{0 up}")
    ~q::ClonesPush("{= down}{= up}{q down}{q up}")
    
    
    ; ***************************
    ; *** Hotbars SHIFT(+) 1-0 ***
    ; ***************************
    ~+1::ClonesPush("{= down}{= up}{Shift down}{1 down}{1 up}{Shift up}")
    ~+2::ClonesPush("{Shift down}{2 down}{2 up}{Shift up}")
    ~+3::ClonesPush("{Shift down}{3 down}{3 up}{Shift up}")
    ~+4::ClonesPush("{Shift down}{4 down}{4 up}{Shift up}")
    ~+5::ClonesPush("{Shift down}{5 down}{5 up}{Shift up}")
    ~+6::ClonesPush("{Shift down}{6 down}{6 up}{Shift up}")
    ~+7::ClonesPush("{Shift down}{7 down}{7 up}{Shift up}")
    ~+8::ClonesPush("{Shift down}{8 down}{8 up}{Shift up}")
    ~+9::ClonesPush("{Shift down}{9 down}{9 up}{Shift up}")
    ~+0::ClonesPush("{Shift down}{0 down}{0 up}{Shift up}")
    ~+q::ClonesPush("{Shift down}{q down}{q up}{Shift up}")
    ~+r::ClonesPush("{Shift down}{r down}{r up}{Shift up}")
    
    
    ; **************************
    ; *** Hotbars CTRL(^) 1-0 ***
    ; **************************
    ~^1::ClonesPush("{Ctrl down}{1 down}{1 up}{Ctrl up}")
    ~^2::ClonesPush("{Ctrl down}{2 down}{2 up}{Ctrl up}")
    ~^3::ClonesPush("{Ctrl down}{3 down}{3 up}{Ctrl up}")
    ~^4::ClonesPush("{Ctrl down}{4 down}{4 up}{Ctrl up}")
    ~^5::ClonesPush("{Ctrl down}{5 down}{5 up}{Ctrl up}")
    ~^6::ClonesPush("{Ctrl down}{6 down}{6 up}{Ctrl up}")
    ~^7::ClonesPush("{Ctrl down}{7 down}{7 up}{Ctrl up}")
    ~^8::ClonesPush("{Ctrl down}{8 down}{8 up}{Ctrl up}")
    ~^9::ClonesPush("{Ctrl down}{9 down}{9 up}{Ctrl up}")
    ~^0::ClonesPush("{Ctrl down}{0 down}{0 up}{Ctrl up}")
    ~^q::ClonesPush("{Ctrl down}{q down}{q up}{Ctrl up}")
    
    
    ~g::ClonesPush("{= down}{= up}{g down}{g up}")
    ~`::ClonesPush("{` down}{` up}")
    ~+x::ClonesPush("{Shift down}{x down}{x up}{Shift up}")
    ~+v::ClonesPush("{Shift down}{v down}{v up}{Shift up}")
    This is based on a script I found somewhere, extended with extra keys. This works perfectly for movement, jumping and 1-9 keys. However, for non-digit keys, sometimes it just refuses to work. I try switching keyboard layouts, reloading the script, etc - sometimes it helps, but other times (such as right now), it just doesn't do anything. Anyone has any idea why this might be happening?

    Edit: uh oh, I figured that out, since it sends english characters, it only works if my second window is currently using english keyboard layout. Is there any way to avoid this, and make it work regardless of currently selected language?
    Last edited by d07.RiV : 12-13-2012 at 04:24 PM

Posting Rules

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