Jump to content

Detecting error window.


Recommended Posts

Good morning,

Recently I've decided to automate a long process that I have to complete every week. Basically its a copy and paste from Excel to a Java application. The problem is that I need quite a bit of error checking. Hopefully I've got most of it sorted out though I am having trouble with an error window that is titled the exact same as the window behind it. Is there any way to have Autoit detect that this error has occurred as both the title string and class are the same? Would I be able to do it via window size?

Thank you for you time.

Link to comment
Share on other sites

Check the window text perhaps. ;)

Something like

If WinExist("title", "text") Then
; Do something
EndIf
Thanks for the suggestion, but alas there is no visible text listed in AutoIt Window info and a quick test didn't pick up the text in the window.

EDIT: Am I able to have AutoIt detect the new error widow by position in the AutoIt Window info summary?

Edited by Zombie1982
Link to comment
Share on other sites

Thanks for the suggestion, but alas there is no visible text listed in AutoIt Window info and a quick test didn't pick up the text in the window.

EDIT: Am I able to have AutoIt detect the new error widow by position in the AutoIt Window info summary?

Pretty sure I've discovered a work around by checking for the window after a certain part of the script is run.... if both still exist then I've gotten the error.

Link to comment
Share on other sites

Does it have any specific controls, this error window?

If so, I guess you could do something like:

If WinExist("title") And ControlGetHandle("title", "", "controlid/classnn") <> "" Then
;do something
EndIf

There's probably cleaner ways to do it, but I can't think of any right now. :|

Edited by FreeFry
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...