Jump to content

Excel popup detection and background interaction


Recommended Posts

Hello,

I have an excel macro which sometimes requires interaction through a popup window.

I have tried to use AutoIT to interact with the popup but cannot find the way to automatically interact with the popup at the background. WinExists (when the Excel is at the background) and ControlSend parameters that I got from the Au3Info.exe for the popup window properties do not work for the popup so I've run into the conclusion that the window is child to the Excel window. Unfortunately, all my Parent/Child detections have failed over and over again for the Excel popup.

So far I have gone around the issue by checking whether the Excel program is flashing in the Task Bar, activated the Excel window, sent the parameters to the popup and restored the previous active window.

Could someone help how could I detect the existance of the Excel child window and directly interact with it without activating it? Would appreciate it highly.

Thanks in advance

Link to comment
Share on other sites

To be more descriptive, I have attached a sample code I am currently trying to use.

When the Excel is activated after the popup window becomes visible, I can use the _WinAPI_EnumWindows succesfully and with found handle, trigger ControlSend and ControlClick functions to the popup window.

The problem is that if the Excel has not been an active window after the popup has appeared (and the Excel program is flashing at the Task Bar), the _WinAPI_EnumWindows does not list this popup window until the Excel program is activated again.

Can this popup window handle be found without re-activating the Excel program window?

sample.au3

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