Code: Select all
LButton::
CoordMode, Mouse, Screen
MouseGetPos, posX, posY
if ((posX >= 1658) && (posY >= 818)) || ((posX >= 549) && (posX <= 1212) && (posY >= 975)) { ; Minimap and information bar
SendInput {Shift down}{LButton down}
_release := "{LButton up}{Shift up}"
} else {
SendInput {LButton down}
_release := "{LButton up}"
}
Return
LButton up::SendInput %_release%
So far, this is working fine. However, the very first time I hover these areas and press the LMB, it sends LMB instead of Shift+LMB. Why is that? Additionally, if I spam the LMB key over the minimap, sometimes it will send a LMB instead of Shift+LMB. It happens very rarely, but I can't afford it to happen at all. Are there any ways to fix these?