I am very new to AutoIT and I have a program which I am trying to uninstall in a specific fashion. All of the window Titles are exactly the same including a popup window prompting for a restart. My goal is to wait until the popup window is displayed so I can overwrite a value that was set in the registry before it restarts on its own. When I use a command such as
;Wait & Click Next
WinWaitActive("ExampleProgram")
While Not ControlCommand('ExampleProgram','','Button1','IsEnabled','')
Sleep(1000)
WEnd
Run("ImportRegistry.bat")
The ImportRegistry.bat fires off immediately because the Title of all the windows are "ExampleProgram". The only value that I have found unique to the popup window is the Handle Value. So my question is, can I use the Handle Value instead of the Title Value to identify the window to wait for? If not, is there another value or way to do this that is more feasible.
Another issue is that based on how the program runs against a given computer it may or may not prompt for a restart, so if I implement the wait successfully, if the restart prompt window never appears will the script hang indefinitely?
Thanks for your patience and assistance in advance!