Zilee Posted March 21, 2011 Share Posted March 21, 2011 I have this code sample I found on the web, for some reason I get two prompts to the Log Off window, after these two are gone the windows all get closed which is a good thing. I'm just wondering how I should get rid of those two window prompts, here's the code : Func killAllWindows() $WinListArr = WinList() For $i = 1 To $WinListArr[0][0] If WinVisible($WinListArr[$i][1]) Then WinClose($WinListArr[$i][1]) Next EndFunc Func WinVisible($Title, $Text="") Return BitAnd(WinGetState($Title, $Text), 2) EndFunc killAllWindows() Link to comment Share on other sites More sharing options...
Zilee Posted March 22, 2011 Author Share Posted March 22, 2011 Anyone :< Link to comment Share on other sites More sharing options...
Mallie99 Posted March 22, 2011 Share Posted March 22, 2011 I'd start by getting the script to show you all the open windows contained in $WinListArr... There may be a couple of windows you'll need to exclude from the close process. Are you telling me something I need to know or something I want to know? Link to comment Share on other sites More sharing options...
Zilee Posted March 22, 2011 Author Share Posted March 22, 2011 I'd start by getting the script to show you all the open windows contained in $WinListArr... There may be a couple of windows you'll need to exclude from the close process. Yeah I went too fast, only checked the content of [1] instead of [0] so I was seeing their address instead of the titles. Decided to change the code so that it could take an array of exclusions. Thanks mate. For some reason Program Manager was in the list of windows to close. 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