I found this script somewhere (can't remember, else I'd give credit due) for determining your main wow regardless of how many you're running, it's modified version of Sorn's ..but for multi instead of 2:
[code:1]
;Tell user what is about to happen
SplashTextOn, 325, , Preparing to find your Main and Clone windows of WoW.
Sleep, 2000
SplasHtextoff
;Grab unique window ID's
WinGet, wowid, List, World of Warcraft
;wowid contains the number of active wow windows found
; Minimize All WOW windows
Loop, %wowid%
{
thiswowid := wowid%A_index%
WinMinimize, ahk_id %thiswowid%
}
;Determine Main and Clone Windows
Loop, %wowid%
{
thiswowid := wowid%A_index%
WinActivate, ahk_id %thiswowid%
MsgBox, 4,, Is this your WOW Main window? (press Yes or No)
IfMsgBox Yes
{
idMain = %thiswowid%
Break
}
else
continue
}
;all others are clones
Loop, %wowid%
{
thiswowid := wowid%A_index%
if (thiswowid = idMain)
continue
count++
idClone%count% := thiswowid
}
numberOfClones := wowid - 1
;Activate All WOW windows
WinActivate, ahk_id %idMain%
Loop, %numberOfClones%
{
thiswowid := idClone%A_index%
;WinActivate, ahk_id %thiswowid%
}
;
return[/code:1]
From this I figured that the loop function could be used for keystrokes:
[code:1]
#IfWinActive, World of Warcraft
1::
ControlSend,,{1 down}{1 up}, ahk_id %idMain%
Loop, %numberOfClones%
{ thiswowid := idClone%A_index%
ControlSend,,{1 down}{1 up}, ahk_id %thiswowid%
}
return
[/code:1]
(and repeat for any keys you need)
Only thing is, I'm not sure if this will cause unnecessary latency or some other problem I'm not aware of, would appreciate input on this.
Connect With Us