mdwerne Posted June 3, 2008 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
RyanOlson Posted June 3, 2008 Posted June 3, 2008 does the program have a hot key for ok then you can just do a send("!O") Which would send an alt o to close the windows.
Achilles Posted June 3, 2008 Posted June 3, 2008 Don't spam ... I'm guessing that he didn't do that on purpose. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
mdwerne Posted June 3, 2008 Author Posted June 3, 2008 Don't spam ... Whadye do?Not sure what you mean by spam?Best I can tell I placed 1 post in 1 forum.Huge apologies if I did something wrong. :-(-Mike (newbie)
RyanOlson Posted June 3, 2008 Posted June 3, 2008 yah it posted 3 times but check that out run your file and try alt o on your keyboard if that works just use the send ("!o")
mdwerne Posted June 3, 2008 Author Posted June 3, 2008 yah it posted 3 times but check that out run your file and try alt o on your keyboard if that works just use the send ("!o")Hi Ryan,No, alt o did not work. Sorry about the multiple posting...I guess I hit the post button a couple times. I thought it was my machine, turned out that Dreamhost was having some issues. Thanks for the heads up, sorry to all!!-Mike
PsaltyDS Posted June 4, 2008 Posted June 4, 2008 OK, double posting is just a training issue for noobs, but triple posting is becoming spam... 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
mdwerne Posted June 4, 2008 Author Posted June 4, 2008 Aside from my triple post stupidity...does anyone have a suggestion as to how I can use AutoIt to identify and handle the unknown window in my first post? If I could get the "Window Titles and Text (Advanced)" to work using X \ Y \ W \ H or CLASS, I think I would be good to go, but my efforts have been fruitless and I cannot find an example using X \ Y \ W \ H for the "title parameter". I tried this without success... 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 Thoughts? Thanks for the suggestions thus far, Mike
PsaltyDS Posted June 4, 2008 Posted June 4, 2008 Aside from my triple post stupidity...does anyone have a suggestion as to how I can use AutoIt to identify and handle the unknown window in my first post?Another problem with multiple posting... you don't know when you've already got the answer! 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
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