; Number of clients Clients := 2 ; Which keys (1=on, 0=off) Num1 := 1 Num2 := 1 Num3 := 1 Num4 := 1 Num5 := 1 Num6 := 1 Num7 := 1 Num8 := 1 Num9 := 1 Num0 := 1 Minus:= 1 Equal:= 1 Space:= 1 Ctrl := 1 Alt := 1 Shift:= 1 ; DO NOT EDIT PAST HERE #Persistent Loop { WinGet, wowid, List, World of Warcraft If (wowid != Clients) { MsgBox, 17, AHK MultiBox, You don't have the correct number of World of Warcraft windows open`nOpen: %wowid%`nSet For: %Clients%`nPress OK when the correct number of windows are open. IfMsgBox Cancel ExitApp } } KeyList = 1|2|3|4|5|6|7|8|9|0|-|=|^|!|%A_Space%|+ StringSplit, KeyList, KeyList, | Hotkey, IfWinActive, World of Warcraft Loop, %KeyList0% { Key := KeyList%A_Index% KeyVar := RegExMatch(Key,"^\d$") ? Num%Key% : Key = "-" ? Minus : Key = "=" ? Equal : Key = "^" ? Ctrl : Key = "!" ? Alt : Key = "+" ? Shift : Key = " " ? Space : Key If (KeyVar) Hotkey, ~%Key%, SendKey } Return SendKey: KeyWait, % SubStr(A_ThisHotkey,2,1), D Loop, % Clients ControlSend,, % SubStr(A_ThisHotkey,2,1), % "ahk_id" . wowid%A_Index% Return