I recently bought a new mouse (Spirit of Gamer PRO-M5), and since then, my script doesn't work properly. The script is fairly simple : after you press middle mouse button, it swap inventory. Here the code :
MouseGetPos, mousePosX, mousePosY ;mousePosX/Y have old mouse position
ControlGetPos, xpos, ypos, width, height,, A ; Get width and height of A(ctive) window
slotX := xpos + (0.72 * width)
slotY := ypos + (0.68 * height)
if slot > 4
slotX += (0.06 * width) * (slot - 4)
slotY += (0.06 * height)
slotX += (0.06 * width * slot)
MouseMove, slotX, slotY
MouseMove, mousePosX, mousePosY
the invswap function makes you double click somewhere ingame to swap gear.
On my old mouse, the script starts whether you hold left mouse button or not.
But on that new mouse, it's a little weirder :
- Holding left button and pressing middle button => not working
- Holding any other key (even right button) and pressing middle button => working
- Not holding any key and pressing middle button => working
- Changing hotkey to any other button and holding left button => working
the middle mouse button is not even recorded in the key history while holding left mouse button (but the middle click is recognized otherwise).
At this point, I assume there's something with this particular mouse and that I can't do anything about it with ahk, but in case someone got some more knowledge on this behavior, and perhaps know how to fix it, please let me know