I have an "antiflame" macro for League, that sends a motivational sentence when I press Enter, effectively disabling the chat.
It used to work fine, but now it only works for one game, and then if I start another one I have to reload the script.
This only happens in League windows, tested on other games/applications and it works as intended.
Here is the script:
Code: Select all
if not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
#If WinActive("ahk_class RiotWindowClass") || WinActive("ahk_class TankWindowClass")
*Enter::
*NumpadEnter::
Send, {Enter}
sleep, 100
Send, (It picks a sentence randomly from an array)
sleep, 100
Send, {Enter}
return
#If