AutoItKing Posted March 8, 2006 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]
cdkid Posted March 8, 2006 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!
AutoItKing Posted March 8, 2006 Author 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]
slightly_abnormal Posted March 9, 2006 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
slightly_abnormal Posted March 9, 2006 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
AutoItKing Posted March 9, 2006 Author 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]
AutoItKing Posted March 9, 2006 Author 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]
AutoItKing Posted March 10, 2006 Author 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]
Valuater Posted March 10, 2006 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)
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