Search the Community
Showing results for tags 'pop-up'.
-
I have an AutoIt script that works very well manipulating an external application as long as the application under control does not present an error. I have written the script to send an "item id" to an input box on the external application GUI, followed by "Send("{ENTER}")", and then I use a "WinWaitActive" to ensure that the external application GUI changes to the expected screen before moving on, all of which works perfectly. The problem arises if the "item id" sent is incorrect, or if the external application has that particular item "on hold", causing the external app to present a dialog box with an alert, which can be dismissed by clicking its' "OK" button. Under normal circumstances, the input data is immediately accepted, and the application under control changes to an "expected" screen, which AutoIt detects and then runs off to do the usual function stuff. Since the script is "Win-Waiting" for the expected box (currently with an infinite timeout), but is instead presented with a dialog box that the script is not looking for, I am in brain-lock about what to do about it. I tried registering an "adLib" timing function to break out of the waiting loop (by changing the "winWait" to a While (NOT) loop testing "WinExists", but apparently the error dialog to which I am trying to switch detection is a "Blocking" type that prevents the "adLib" function from running. I thought I had read that if "WinWaitActive" is used with a timer value, it could be caused to execute the following line upon timeout, or the line after if it gets its $hwnd before timeout. That would simplify things, but I don't remember where I saw the example. I have been using AutoIt for a very long time, but never really came upon a circumstance like this where I need to be able to detect the presence of an "unexpected" pop-up while waiting for another... Any clues would surely be appreciated!
- 13 replies
-
- error dialog
- dialog box
-
(and 1 more)
Tagged with: