Aye, it does click in both windows, but at the cursor's current position. I've been bashing my head for a while, and indeed it seems that there has to be something with WoW itself, I really don't see any other explanation for this. Your script does exactly the same thing too, sadly
But thanks anyway, at least now I'm sure that it isn't something on my side. Guess I'll have to find a workaround for this particular thingy.
Hey. I was also putzing with something like this. I was experimenting with two windows of MS paint, and could get the cursor to 'paint' black dots in the correct spots on the windows.
I could not click and drag, only make dots.
Change 'World of Warcraft' with 'Untitled - Paint' if you want to try with 2 blank MS paint windows
hotkey, +c, close
SetTitleMatchMode, 3
SetDefaultMouseSpeed, 0
WinGet, ID, List, World of Warcraft
winmove, ahk_id %ID1%, ,0,0,1280,960
sleep, 100
winmove, ahk_id %ID2%, ,1280,560,640,480
WinGetPos, x1, y1, w1, h1, ahk_id %ID1%
WinGetPos, x2, y2, w2, h2, ahk_id %ID2%
LButton::
MouseGetPos, MX, MY
mrx := mx/w1
mry := my/h1
m2x := mrx*w2
m2y := mry*h2
Round (m2x,0)
Round (m2y,0)
SetControlDelay -1
ControlClick , x%mx% y%my%, ahk_id %ID1%, , %button%, %clickcount%,
ControlClick , x%m2x% y%m2y%, ahk_id %ID2%, , %button%, %clickcount%,
Return
close:
exitapp