I don't understand why the left click does not work while the right does.
Maybe i'm wrong with this code...i try to keep the focus on a window game and execute the same action on others behind without change window.
Code: Select all
#SingleInstance Force
#Persistent
#NoEnv
SetBatchLines -1
DetectHiddenWindows, On
CoordMode, mouse, relative
WinGet, gamename, List, ahk_exe namegame.exe
#IfWinActive ahk_exe namegame.exe
!a::
MouseGetPos xpos, ypos
loop, %namegame%
{
Id := namegame%A_Index%
ControlClick, x%xpos% y%ypos%, ahk_id %Id%, , Left, 1
}
return
[Mod edit: Wrong subforum: Moved topic to AHK v1 help, since this is not v2 related.]