Zombie1982 Posted August 21, 2008 Share Posted August 21, 2008 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 More sharing options...
FreeFry Posted August 21, 2008 Share Posted August 21, 2008 Check the window text perhaps. Something like If WinExist("title", "text") Then ; Do something EndIf Link to comment Share on other sites More sharing options...
Zombie1982 Posted August 21, 2008 Author Share Posted August 21, 2008 (edited) 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 August 21, 2008 by Zombie1982 Link to comment Share on other sites More sharing options...
Zombie1982 Posted August 21, 2008 Author Share Posted August 21, 2008 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 More sharing options...
FreeFry Posted August 22, 2008 Share Posted August 22, 2008 (edited) 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 August 22, 2008 by FreeFry Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now