Rogue5099 Posted March 2, 2008 Share Posted March 2, 2008 Below is what I want to auto close if it pops up.http://tinypic.com/fullsize.php?pic=20r0h6...;capwidth=falseI have tried:Opt("WinTitleMatchMode", 3); This makes sure the window name is an exact match If WinExists("Microsoft Windows", "&Close program") Then WinKill("Microsoft Windows", "&Close program") EndIf&WinClose("[CLASS:#42770]", "")&$Handle = WinGetHandle("[TITLE:Microsoft Windows; [CLASS:#42770]", "") WinClose($Handle)&$Handle = WinGetHandle("Microsoft Windows", "") WinClose($Handle)&WinKill("Microsoft Windows")Nothing I did would close this stubburn window! My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
MHz Posted March 2, 2008 Share Posted March 2, 2008 (edited) Welcome,Thanks for the picture but it is not showing enough information for me to come to some solution without guessing.I would try thisOpt("WinTitleMatchMode", 3); This makes sure the window name is an exact match If WinExists("Microsoft Windows", "&Close program") Then ; Check if the window is visible If BitAND(WinGetState("Microsoft Windows", "&Close program"), 2) Then ControlClick("Microsoft Windows", "&Close program", "&Close program") EndIf EndIfThat is assuming the text parameter has the "&" character which I cannot see in your picture. WinExists can also see hidden windows thus why I added a condition to check if the window is indeed visible first before clicking the button.Edit:Added a string into text parameter of ControlClick for improvement. Edited March 2, 2008 by MHz Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 2, 2008 Author Share Posted March 2, 2008 Thank you I'll try that, in the Visable txt it has &Close program and there where no hidden txt. My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
MHz Posted March 2, 2008 Share Posted March 2, 2008 Thank you I'll try that, in the Visable txt it has &Close program and there where no hidden txt.I edited the last post a little. See bottom of last post for reason of edit. 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