Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Simultaneous click in multiple WoW windows at a defined spot


  • Please log in to reply
5 replies to this topic
JackSparrow
  • Guests
  • Last active:
  • Joined: --
Greetings!

I'm taking my first steps into multiboxing, and right now, I'm trying to send a simultaneous left click at a predefined position in multiple WoW windows at once. I've figured that this script should work as: I press 9 and AHK makes a click in both windows

WinGet, wowid, List, World of Warcraft

#IfWinActive World of Warcraft
~9::
CoordMode, Mouse, Relative
ControlClick, x180 y368, ahk_id %wowid1%
ControlClick, x180 y368, ahk_id %wowid2%
return

But it doesn't work - the click is being sent at the current mouse position instead of the specified one, in both windows. What am I doing wrong?

GodlyCheese
  • Members
  • 719 posts
  • Last active: Nov 11 2014 07:12 PM
  • Joined: 30 Aug 2012
WinGet, wowid, List, World of Warcraft



#IfWinActive World of Warcraft

~9::

CoordMode, Mouse, Relative

[color=#FF0000]SetControlDelay -1[/color]

ControlClick, x180 y368, ahk_id %wowid1%

ControlClick, x180 y368, ahk_id %wowid2%

return


JackSparrow
  • Guests
  • Last active:
  • Joined: --
Did not help, sadly :( The script still clicks at the current mouse position

GodlyCheese
  • Members
  • 719 posts
  • Last active: Nov 11 2014 07:12 PM
  • Joined: 30 Aug 2012
Does it click in the non-active WoW windows too or only in the active one? If it's only clicking in the active window then it's pretty safe to say the issue is with using ControlSend for WoW.

Otherwise I'm not sure what's wrong. Furthermore I don't think CoordMode does anything for ControlClick (assuming the Help file is to be trusted) so you might want to try this:

WinGet, wowid, List, World of Warcraft

#IfWinActive World of Warcraft
~9::
SetControlDelay -1
ControlClick, x180 y368, ahk_id %wowid1%
ControlClick, x180 y368, ahk_id %wowid2%
return

I can't troubleshoot this myself because I don't have WoW, so please be as informative as possible. If that doesn't work then try this:

WinGet, wowid, List, World of Warcraft

#IfWinActive World of Warcraft
~9::
SetControlDelay -1
ControlClick, x180 y368, ahk_id %wowid1%   ;Put the ",,,,NA" here too if you don't have this window active. If it is active then no NA.
ControlClick, x180 y368, ahk_id %wowid2%,,,,NA
return


JackSparrow
  • Guests
  • Last active:
  • Joined: --
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.

Elemeno
  • Members
  • 13 posts
  • Last active: Jan 11 2014 06:21 PM
  • Joined: 02 Jan 2013
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 sad.png 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