AutoItKing Posted March 8, 2006 Share Posted March 8, 2006 I can't seem to figure out how to get all active windows to close in Windows. I've expiramented by getting the handels of windows and then closing them. Help please? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
cdkid Posted March 8, 2006 Share Posted March 8, 2006 Well, you could do $list = WinList() For $i = 1 to $list[0][0] if BitAnd(WinGetState($list[$i][0]), 2) Then;Is visible WinClose($list[$i][0]) endif next That 'ought to work ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
AutoItKing Posted March 8, 2006 Author Share Posted March 8, 2006 (edited) I got it all worked out. Check the Attachment[edit] Moved to scripts and scraps! Here Edited May 15, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 9, 2006 Share Posted March 9, 2006 (edited) Hi! Ain't no one gonna try my script? the code cd posted i had to restart my machine, it shut down every - single - process [edit] really cool, thanks! autoitking, i was hunting for something like this! Edited March 9, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 9, 2006 Share Posted March 9, 2006 (edited) [EDIT] hEY, how do I get the handle, and how do I add more than one app to the do not close list? Edited March 9, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
AutoItKing Posted March 9, 2006 Author Share Posted March 9, 2006 the code cd posted i had to restart my machine, it shut down every - single - process Yup. That's what happened to me too. So i just added in If $sd_windows[$i][0] <> "" AND BitAnd( WinGetState($sd_windows[$i][1]), 2 ) {{{{AND $sd_windows[$i][0] <> "Program Manager"}}}} Then That's the title of Explorer. If you use WinKill to close it Windows goes wacky and you have to restart your computer. Pissed me off pretty bad! http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
AutoItKing Posted March 9, 2006 Author Share Posted March 9, 2006 (edited) [EDIT] hEY, how do I get the handle, and how do I add more than one app to the do not close list?Handle? Of What? And to leave more than just one window open..... Haven't added that yet. [EDIT] Okay I added it. You can Have up to three windows left open. _ShutDown(4,"AutoIt Forums - Microsoft Internet Explorer", "Untitled - Notepad", "untitled - Paint") Hope that helps! Edited March 9, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
AutoItKing Posted March 10, 2006 Author Share Posted March 10, 2006 Hey, Jon or some one. Can you move this to the Scripts and Scraps section please? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 Hey, Jon or some one. Can you move this to the Scripts and Scraps section please? just make a post with the pertinant stuffand without a topic title of a question8) 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