mdwerne Posted June 3, 2008 Share Posted June 3, 2008 Hello, How do I wait for and close a window with no "Title"? I just want to "click" the OK button and close the window. Here is the window information: >>>> Window <<<< Title: Class: #32770 Position: 549, 479 - this changes with resolution Size: 188, 126 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x00041174 - this changes for some reason >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x0004117C >>>> Mouse <<<< Position: 658, 491 Cursor ID: 0 Color: 0x343434 >>>> StatusBar <<<< >>>> Visible Text <<<< OK Uninstallation Complete. >>>> Hidden Text <<<< My attempt/s thus far: Opt("WinTitleMatchMode", 4) ;WinWait("[X \ Y \ W \ H:0, 0, 188, 126]", "") WinWait("[CLASS:#32770]", "") ;WinClose("[X \ Y \ W \ H : 0 , 0 , 188 , 126]", "") WinClose("[CLASS:#32770]", "") WinWait("Adobe Flash Player Uninstaller Setup: Completed") WinClose("Adobe Flash Player Uninstaller Setup: Completed") Exit There are actually two windows that "may" popup. I want to look for the first, if it comes up, I close it - if not, I look for second window and close it. Then quit. Thanks for any hints, -Mike Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 4, 2008 Share Posted June 4, 2008 Hello, How do I wait for and close a window with no "Title"? I just want to "click" the OK button and close the window. Here is the window information: >>>> Window <<<< Title: Class: #32770 Position: 549, 479 - this changes with resolution Size: 188, 126 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x00041174 - this changes for some reason >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x0004117C >>>> Mouse <<<< Position: 658, 491 Cursor ID: 0 Color: 0x343434 >>>> StatusBar <<<< >>>> Visible Text <<<< OK Uninstallation Complete. >>>> Hidden Text <<<< My attempt/s thus far: Opt("WinTitleMatchMode", 4) ;WinWait("[X \ Y \ W \ H:0, 0, 188, 126]", "") WinWait("[CLASS:#32770]", "") ;WinClose("[X \ Y \ W \ H : 0 , 0 , 188 , 126]", "") WinClose("[CLASS:#32770]", "") WinWait("Adobe Flash Player Uninstaller Setup: Completed") WinClose("Adobe Flash Player Uninstaller Setup: Completed") Exit There are actually two windows that "may" popup. I want to look for the first, if it comes up, I close it - if not, I look for second window and close it. Then quit. Thanks for any hints, -Mike Use the advanced match mode, as you have and try CLASS plus TEXT: "[CLASS:#32770; TEXT:Uninstallation Complete]" Note that both of those values came from the AU3Info data. No where in that data do you see "Adobe Flash Player Uninstaller Setup: Completed", which is why that won't help. Using the class by itself can get multiple matches, especially with #32770 which is a very common dialog class. Welcome to AutoIt, and please try to avoid double posting. You should be able to Edit/Delete your own posts and get rid of the duplicate. 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...
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