ndw Posted November 15, 2011 Posted November 15, 2011 Hello, this isn't a specific coding question and more a fact finding exercise! I'm writing a script with a command line interface that opens up an application and performs regression testing on it. It takes pictures of the application and i use an image difference application to find the results. This is all working fine so long as the pictures are there. The problem i'm finding is, if something goes wrong with the program, it can pop up an error message box which i have no idea how to constantly check for, or after clicking something nothing happens cause the application has frozen. I've had the application close down completely and the AutoIT script take my desktop to pieces too. I wanted to know if anyone has any solutions, maybe using the software for a similar task to what i'm using it for etc?
flaggy Posted November 15, 2011 Posted November 15, 2011 In the past I've resorted to running another script in parallel to constantly keep a lookout for certain specific dialog boxes and to deal with them. This can work if you know what error boxes you are likely to encounter.Something like:while 1 ;keep checking forever Sleep(50) ;don't hog resources If winexists (.... winactivate(... Send("{enter}") ;send an enter kerystroke to the dialog to close it, or you could send a control click or keyboard shortcut EndifWEnd(remember to close the program when you're done with it)
water Posted November 15, 2011 Posted November 15, 2011 There is a with the same subject. A script waits just for windows to pop up generated by a specific process ID and clicks them away. is some code wo work with. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
ndw Posted November 15, 2011 Author Posted November 15, 2011 Thank you to both of you for your suggestions. I'll get reading through them to try and get my head round them!
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