Sign in to follow this  
Followers 0
cypher175

Query A Process For Error Windows..?

6 posts in this topic

Is there any way to Query A Process every so often to see if any Error Windows have come about from it..??

Share this post


Link to post
Share on other sites



You could, as long as you know the ProcessID of the process, and the title/class/text of the error window, using this function:

WinGetProcess

Something like:

If WinExists("Error window") And WinGetProcess("Error Window") = $ProcessID Then
...
EndIf

Share this post


Link to post
Share on other sites

what if you dont know the title/class/text of the error window.. is there any general way to just check if another window has come about from a PID..??

Share this post


Link to post
Share on other sites

So the error window has no title or text that always stays the same when it tells you an error has occurred?

If not, then the only thing you can do is to track what windows the process has, and do something if it creates another window..

Share this post


Link to post
Share on other sites

what if you dont know the title/class/text of the error window.. is there any general way to just check if another window has come about from a PID..??

http://www.autoitscript.com/forum/index.php?showtopic=41639

_WinGetByPID or some variance there of. You can check returned handles against a list of known existing windows for the process.

Share this post


Link to post
Share on other sites

Handles are not static(like class names, or titles, etc.), so he would have to store all existing windows for the process(during runtime), then compare them against the list to find out if any new window was created. But that still doesn't tell him that just that window that the process created is an error window...

I find it somewhat unlikely that the process creates a window, with no sort of static message declaring that an error occured.

To the OP:

Can you show us a screenshot, or a text snip of what the window contains/looks like? :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0