AutoItKing Posted March 10, 2006 Share Posted March 10, 2006 (edited) Here's a UDF I made that closes all windows and then either logs off, shuts down, closes all windows and then leaves a few open, or just close all windows. ;=============================================================================== ; ; Description: Close all windows according to $sd_method ; Syntax: _ShutDown($sd_method, $sd_leaveopen) ; Parameter(s): $sd_method - ===================================================== ; method 0- close all windows and log off ; method 1- close all windows and shutdown ; method 2- close all windows and reboot ; method 3- close all windows ; method 4- close all windows except for $sd_leaveopen ; ===================================================== ; $sd_leaveopen - "Window Title|Another|and one more" ; ; Requirement(s): $sd_method ; Return Value(s): On Success - None ; On Failure - None ; Author(s): AutoItKing <bendudefu [at] aim [dot] com> and Danny35d ; Note(s): Use with caution! ; ;=============================================================================== _ShutDown.au3 Previous downloads: 500+ _ShutDown_test.au3 Edited May 25, 2007 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 11, 2006 Share Posted March 11, 2006 (edited) Here's a UDF I made that closes all windows and then either logs off, shuts down, closes all windows and then leaves a few open, or just close all windows. hey, autoit king, this script very sweet.. thanks again. Edited March 11, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
AutoItKing Posted March 13, 2006 Author Share Posted March 13, 2006 Thanks for that! I don't think it tastes very sweet though 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...
busysignal Posted March 19, 2006 Share Posted March 19, 2006 Simple and very useful! Cheers.. Link to comment Share on other sites More sharing options...
AutoItKing Posted March 26, 2006 Author Share Posted March 26, 2006 No doubt! 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...
ConsultingJoe Posted March 26, 2006 Share Posted March 26, 2006 No doubt! wow, COOL MAN, A+Could you addprocess control toowait, Is there a way to get process list and if so the user name that it is in??? Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
AutoItKing Posted March 29, 2006 Author Share Posted March 29, 2006 I don't think so...... I'll leave that open ended. 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 June 17, 2006 Author Share Posted June 17, 2006 Wow, 155 downloads! " _ShutDown.au3 ( 2.91k ) Number of downloads: 155" 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 June 21, 2006 Author Share Posted June 21, 2006 Wow, 155 downloads!" _ShutDown.au3 ( 2.91k ) Number of downloads: 155"Now it's at 174! 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...
Klaatu Posted June 23, 2006 Share Posted June 23, 2006 Now it's at 174!Shame, you missed 18 opprotunities to increase your post count! And now you've missed 15 more! Work on that, will you? My Projects:DebugIt - Debug your AutoIt scripts with DebugIt! Link to comment Share on other sites More sharing options...
AutoItKing Posted June 23, 2006 Author Share Posted June 23, 2006 Shame, you missed 18 opprotunities to increase your post count! And now you've missed 15 more! Work on that, will you? What? 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...
NELyon Posted June 23, 2006 Share Posted June 23, 2006 Nice one... you make me feel bad because i cant code as good as you Link to comment Share on other sites More sharing options...
AutoItKing Posted June 24, 2006 Author Share Posted June 24, 2006 (edited) You'll learn, I wasn't this good when I started. (believe me ) And now on top of all that I'm learing PHP and C++! Edited June 24, 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...
Thatsgreat2345 Posted June 24, 2006 Share Posted June 24, 2006 ... and yet you still use IE how sad Link to comment Share on other sites More sharing options...
AutoItKing Posted June 24, 2006 Author Share Posted June 24, 2006 FireFox and Opera don't work for me, it's the firewall, and I'm not the admin. 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...
Simucal Posted June 24, 2006 Share Posted June 24, 2006 FireFox and Opera don't work for me, it's the firewall, and I'm not the admin.How does a firewall prevent you from running Firefox? AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
NELyon Posted June 24, 2006 Share Posted June 24, 2006 i know some VERY, VERY basic php, and i mastered html at age 9 I won't step near c or java though Link to comment Share on other sites More sharing options...
AutoItKing Posted June 26, 2006 Author Share Posted June 26, 2006 (edited) How does a firewall prevent you from running Firefox?Program acsess and an internet firewall, only ie can go online! As in, only ie can get onto the internet, all others are blocked, I can run them though.I'm pretty good with html. You need it for the internet! (but I still use an editor for the big sites!)<font color=CadetBlue>I love HTML!</font>http://www.w3schools.com/html/This is where I learned html. And this is where I learned php. lolIf you want to learn more php, I'm there for ya! Edited September 18, 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...
Danny35d Posted June 27, 2006 Share Posted June 27, 2006 (edited) @AutoItKing I like the UDF I did some changes, I hope you dont mind..expandcollapse popup#include-once ; ------------------------------------------------------------------------------ ; ; AutoIt Version: 3.0 ; Language: English ; Description: Functions that assist with closing windows. ; ; ------------------------------------------------------------------------------ ;=============================================================================== ; ; Description: Close all windows according to $sd_method ; Syntax: _ShutDown($sd_method, $sd_leaveopen, $sd_leaveopen2, $sd_leaveopen3) ; Parameter(s): $sd_method - ===================================================== ; method 0- close all windows and log off ; method 1- close all windows and shutdown ; method 2- close all windows and reboot ; method 3- close all windows ; method 4- close all windows except for $sd_leaveopen ; ===================================================== ; $sd_leaveopen - "Window Title" ; $sd_leaveopen2 - "Window Title" ; $sd_leaveopen - "Window Title" ; ; Requirement(s): $sd_method ; Return Value(s): On Success - None ; On Failure - None ; Author(s): AutoItKing <bendudefu [at] aim [dot] com> ; Note(s): Use with caution! ; ;=============================================================================== Func _ShutDown($sd_method, $sd_leaveopen = "Program Manager", $sd_leaveopen2 = "Program Manager", $sd_leaveopen3 = "Program Manager") $i=1 $sd_windows = WinList() While 1 If $sd_windows[$i][0] <> "" AND BitAnd( WinGetState($sd_windows[$i][1]), 2 ) AND $sd_windows[$i][0] <> "Program Manager" Then If $sd_method == 4 And (StringInStr($sd_windows[$i][0], $sd_leaveopen) <> 0 Or StringInStr($sd_windows[$i][0], $sd_leaveopen2) <> 0 Or StringInStr($sd_windows[$i][0], $sd_leaveopen3) <> 0) Then Else WinClose($sd_windows[$i][0]) EndIf EndIf $i += 1 If $i == $sd_windows[0][0] Then If $sd_method == 0 Or $sd_method == 1 Or $sd_method == 2 Then Shutdown(Int($sd_method)) ExitLoop EndIf Wend EndFuncAdded method 2- close all windows and reboot Edited June 27, 2006 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
AutoItKing Posted June 27, 2006 Author Share Posted June 27, 2006 Not bad, it's a lot shorter I must say. And I like the reboot. 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...
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