I have a friend of mine who shares their account with somebody else. I have written this(below)to automatically ask who is there. I want for the script to check the already active steamchat window for an "Exuskazera" or an "Cierra" so it will automatically outputs "logging in as: USER"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.AppActivate "Exuskazera & Mashiro - Chat"
WScript.Sleep 3000
WshShell.SendKeys "Chatbot Login System Version 3.2.3 Codename Ikarus"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "Please choose an account from below:"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "Exuskazera :potplant:"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "Cierra :potplant:"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "Please choose an account by writing its name to the Chat"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "You have 20seconds to choose, if you do not, you will be logged in as Guest!"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "20"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "19"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "18"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "17"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "16"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "15"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "14"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "13"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "12"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "11"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "10"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "9"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "8"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "7"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "6"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "5"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "4"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "3"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "2"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "1"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "Logging in as:<USER>"
WshShell.SendKeys "{ENTER}"
The only text you can get is the text in the titlebar. See tasklist /v
.