I just started dual boxing a few days ago and I've been working on this script with a few of the guys in the AHK IRC (thanks for all the help). I've fine tuned it to do everything I need to so far, and all I have left to do is in-game macros and bindings.
Code:
#Persistent
#IfWinActive, World of Warcraft
SetTitleMatchMode, 3
SetKeyDelay, -1
Thread, interrupt, 0
SetBatchLines, -1
WoW = World of Warcraft
WinGet, WinID, List, %WoW%
LastFollow := A_TickCount - 1000
; SUSPEND KEYS
; These keys will suspend the use of all other hotkeys in this script
~Enter::
~/::
~r::
Suspend, Toggle
Return
; HOTBAR KEYS, KEYBINDINGS, ETC.
; These keys are sent as-is to every WoW window
~1::
~2::
~3::
~4::
~5::
~6::
~7::
~8::
~9::
~0::
~-::
~=::
~x::
~z::
~Space::
StringTrimLeft, ThisKey, A_ThisHotKey, 1
WinGet, ThisID,, A
Loop, %WinID%
If (ThisID != WinID%A_Index%)
ControlSend,, {%ThisKey%}, % "ahk_id" WinID%A_Index%
Return
; MOVEMENT KEYS
; Any of these keys will send Shift+F (binding for follow macro) to all inactive WoW windows
~q::
~w::
~e::
~a::
~s::
~d::
If (A_TickCount - LastFollow > 1000)
WinGet, ThisID,, A
Loop, %WinID%
If (ThisID != WinID%A_Index%)
{
ControlSend,, +f, % "ahk_id" WinID%A_Index%
LastFollow := A_TickCount
}
Return
It's still a work in progress but it seems to do a more efficient job than the script found at WoWWiki. Let me know if you have any suggestions, changes, or additions. Enjoy!
Connect With Us