(I hope this code pastes correctly since i’m on mobile)
——————————————————————————————————————————
Code: Select all
Loop { ; Start Loop
if (WinActive("ahk_exe *program*.exe")) ; program is open
{
WinGetText, text, ahk_exe program.exe ; Get Text from program if open
IfInString, text, "Warning!" ; Check if text is Warning!
{
MsgBox "Warning DETECTED!" ; If so, stop app
ExitApp ; Stops app
Please don't be afraid to tell me that this is complete gibberish if you know any help for the solution
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
[Mod action: Moved topic to the v1 section since this is v1 code. The main section is for v2.]