I've built a script that runs on the background of my computer.... and it needs to run for hours so i can't track it manually all the time
and their are always bug to be fixed...
i want to write a script that monitor the first one and log it's runtime errors with details.
thought of using "StderrRead" but i don't quite understand how to use it...
#include <Constants.au3>
Global $FileName = IniRead("Setting.ini", "Monitors", "Machine", "NotFound") & "/ErrorStdOut" ; "first" auto-it script already compiled
Global $Location = IniRead("Setting.ini", "Monitors", "Location", "NotFound")
Local $foo = Run($FileName ,$Location,@SW_HIDE,$STDERR_CHILD)
Local $line
While 1
$line = StderrRead($foo)
If @error Then
MsgBox(0, "STDERR read:", $line)
ExitLoop
EndIf
Sleep(1000)
Wend
MsgBox(0, "Debug", "Exiting...")
tried to use this simple script but $line just return blank after a runtime error...