WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jonathanfishbein1 on February 28, 2014, 03:21:59 PM

Title: Look for an error Message
Post by: jonathanfishbein1 on February 28, 2014, 03:21:59 PM
Hi
I have a program running an occasionally there an error message pops up that is undesirable.  I would like to write a WinBatch program that looks for that Error Message and records some key measures, maybe memory usage, a print screen, etc.  Anyone have any ideas about how to get started?  Thanks
Title: Re: Look for an error Message
Post by: Deana on February 28, 2014, 07:16:09 PM
I suppose you could write a script that waits until the window appears:WinWaitExist. You can get system data using wmi, WinSysInfo and Snapshot for a print screen.
Title: Re: Look for an error Message
Post by: George Vagenas on February 28, 2014, 10:07:49 PM
If the error window is not a top level window Winbatch may not be able to detect it.  You should verify that Winbatch can detect the window.
Title: Re: Look for an error Message
Post by: Deana on March 03, 2014, 07:41:41 AM
Quote from: George Vagenas on February 28, 2014, 10:07:49 PM
If the error window is not a top level window Winbatch may not be able to detect it.  You should verify that Winbatch can detect the window.


See WinWaitChild.