Jump to content

How to deal with uncertain window popup


siya
 Share

Recommended Posts

Hi,

I'm implementing an automation program using autoit where I

1. start an application

2. update its data from Internet

3. proceed with several processing steps.

The problem I'm facing is that sometimes after step 2, this application will popup another window producing some kind of report. This popup is uncertain in sense sometimes this may not be produced at all and sometimes it will be produced but it is not guaranteed that it will be immediately after step 2. Looks to me that a different thread of the application puts this window sometimes after step2. When I'm manually doing the work, I just close this window when it pops up but while automating the process, it breaks the logic. If I'm waiting for some window in Step 3 and at the same time the said popup window comes up, then my automation program just hangs.

Please comment / provide help how I can handle (close) this unexpected popup window that may or may not come up at any unexpected time (most probably by a different thread of application)?

Thanks,

Siya

Link to comment
Share on other sites

Hi,

I'm implementing an automation program using autoit where I

1. start an application

2. update its data from Internet

3. proceed with several processing steps.

The problem I'm facing is that sometimes after step 2, this application will popup another window producing some kind of report. This popup is uncertain in sense sometimes this may not be produced at all and sometimes it will be produced but it is not guaranteed that it will be immediately after step 2. Looks to me that a different thread of the application puts this window sometimes after step2. When I'm manually doing the work, I just close this window when it pops up but while automating the process, it breaks the logic. If I'm waiting for some window in Step 3 and at the same time the said popup window comes up, then my automation program just hangs.

Please comment / provide help how I can handle (close) this unexpected popup window that may or may not come up at any unexpected time (most probably by a different thread of application)?

Thanks,

Siya

Start an AdLibEnable() function to watch for the popup and handle it if it appears. This can get more complicated if you trigger the popup with something like _IENavigate(), which may block your script until it is handled, but that would be a special case. The AdLibEnable() function usually works.

;)

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

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...