Basically, made a script that is supposed to send macros to every instance of game opened. The problem is, it doesn't work, it sends B once and then stops working for some reason... If i simply put ahk_class [ GameX ] instead of [ % "ahk_id " winList%a_index% ] it works perfectly
\::Pause, Toggle ]:: WinGet, winList, List, ahk_class GameX Loop % winList { ControlSend, , b, % "ahk_id " winList%a_index% Sleep, 2000 ControlSend, , {Numpad1},% "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad2},% "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad3},% "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 1, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 2, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , e, % "ahk_id " winList%a_index% Sleep, 4500 ControlSend, , {Numpad1}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad2}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad3}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 1, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 2, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , e, % "ahk_id " winList%a_index% Sleep, 4500 ControlSend, , {Numpad1}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad2}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad3}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 1, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 2, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , e, % "ahk_id " winList%a_index% Sleep, 4500 ControlSend, , {Numpad1}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad2}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad3}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 1, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 2, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , e, % "ahk_id " winList%a_index% Sleep, 4500 ControlSend, , {Numpad1}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad2}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , {Numpad3}, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 1, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , 2, % "ahk_id " winList%a_index% Sleep, 100 ControlSend, , e, % "ahk_id " winList%a_index% Sleep, 4500 } ReturnThanks for help if any!
EDIT: added codebox and brackets