Opt("WinTitleMatchMode", 2) #include Dim $aHandle[1], $hList, $sAwayText = InputBox("Steam Automessages", "Enter an automessage for Steam.", "Automessage: I am currently testing my auto messages.") While 1 $hList = WinList(" - Chat") For $i = 1 to $hList[0][0] If ( _ArraySearch($aHandle,$hList[$i][0]) == -1 ) Then _ArrayAdd($aHandle, $hList[$i][0]) ConsoleWrite("[" & @HOUR & ":" & @MIN & "] Sending message to " & StringReplace($hList[$i][0]," - Chat", "") & @CRLF) $hCurActive = WinGetHandle("[ACTIVE]") WinActivate($hList[$i][1]) ClipPut($sAwayText) SendKeepActive($hList[$i][1]) Send("^v{ENTER}") WinActivate($hCurActive) EndIf Next Sleep(100) WEnd