BRUNOYORK Posted September 5, 2007 Share Posted September 5, 2007 once i input the field and click ok. there will some kinds of error / warning msg pop-up. how to identify these windows? as we don't know what kind of error msg will be shown. we can only use "WINWAITACTIVE" any idea?? Thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 5, 2007 Share Posted September 5, 2007 (edited) once i input the field and click ok. there will some kinds of error / warning msg pop-up. how to identify these windows?as we don't know what kind of error msg will be shown. we can only use "WINWAITACTIVE"any idea??Thanks!To use WinWaitActive() you must know something about the window; as in title, text. You can put it in a loop to test for one or a couple possible pop ups, but that is going to be slow because the minimum timeout is 1sec. So you might be better off with a loop that uses just WinActive() and do your own timing with Sleep(), which can time in milliseconds, or TimerInit/TimerDiff. Another possibility is a loop with WinList() in it, giving you a complete list of all open windows to check.Yet another possibility is to on go with your script and leave an AdLibEnable() function running periodically in the background to check for and handle the possible pop up.What they all have in common is a loop run for a limited time that watches for the error pop up and handles it. Choosing one will require thinking about how many different errors you might see, how to identify each one (title/text/etc.), how to handle each one (i.e. click "OK"), and when to stop watching for them (after a certain amount of time, or when the "normal" window comes up). Edited September 5, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
herewasplato Posted September 5, 2007 Share Posted September 5, 2007 ...there will some kinds of error / warning msg pop-up...If some msg pop-up always comes up, then WinWaitNotActive might work for you.If these pop-up msgs only happen when there is a problem, then a timed loop like PsaltyDS mentioned with a series of If WinExists lines.-MSP- [size="1"][font="Arial"].[u].[/u][/font][/size] 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