AlmarM Posted September 12, 2007 Share Posted September 12, 2007 I made this little (simple) Quit Widows Script #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.6.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet('{ESC}', '_Exit') ;ESC to Exit $Click = "Left" MouseClick($Click, 50, 1010, 1, 15) Sleep(100) Send("{UP}") Sleep(100) Send("{ENTER}") Sleep(100) Send("{TAB}") Sleep(100) Send("{ENTER}") Func _Exit() ;ToolTip(' '&@CRLF&' EXITING '&@CRLF&' ') Sleep(500) Exit EndFunc I know its simple but i can't post it on Example Scripts so I'll post it here Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Generator Posted September 12, 2007 Share Posted September 12, 2007 Why not just use ShutDown()and cut it down into 1 click..and whats the mouseclick for? Haven't test it since i am downloading programs and do not wish the computer to restart. Link to comment Share on other sites More sharing options...
jaenster Posted September 12, 2007 Share Posted September 12, 2007 I made this little (simple) Quit Widows Script #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.6.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet('{ESC}', '_Exit') ;ESC to Exit $Click = "Left" MouseClick($Click, 50, 1010, 1, 15) Sleep(100) Send("{UP}") Sleep(100) Send("{ENTER}") Sleep(100) Send("{TAB}") Sleep(100) Send("{ENTER}") Func _Exit() ;ToolTip(' '&@CRLF&' EXITING '&@CRLF&' ') Sleep(500) Exit EndFuncoÝ÷ Ø'£²È¦¦WºØj}ý¶,¶+hLZ^IÊâ¦Û, ýZh²ØêÞ?ú®¢×ºÚ"µÍÚ[ÛYH ÜØÙÜË]LÉÝÂÜ[ÜÊ ][ÝÜÚ]ÝÛÈ] ][ÝÊ or look in the help file for the function Shutdown -jaenster Link to comment Share on other sites More sharing options...
AlmarM Posted September 12, 2007 Author Share Posted September 12, 2007 Lol i know the shutdown code... But I dont want to use it Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
AlmarM Posted September 12, 2007 Author Share Posted September 12, 2007 #include <process.au3> _rundos("shutdown -s -t 0") Lol Why not: Run("CMD.exe") Send("shutdown -s -t 0{enter}") ?? Its the same Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
weaponx Posted September 12, 2007 Share Posted September 12, 2007 Or even create a shortcut on your desktop that runs: shutdown -s -t 0 Link to comment Share on other sites More sharing options...
Monamo Posted September 12, 2007 Share Posted September 12, 2007 I made this little (simple) Quit Widows Script #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.6.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet('{ESC}', '_Exit') ;ESC to Exit $Click = "Left" MouseClick($Click, 50, 1010, 1, 15) Sleep(100) Send("{UP}") Sleep(100) Send("{ENTER}") Sleep(100) Send("{TAB}") Sleep(100) Send("{ENTER}") Func _Exit() ;ToolTip(' '&@CRLF&' EXITING '&@CRLF&' ') Sleep(500) Exit EndFunc I know its simple but i can't post it on Example Scripts so I'll post it here No dice in my case - My taskbar is docked on the left instead of on the bottom, so the hardcoded location for the click fails, subsequently invalidating all Send() commands. - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
weaponx Posted September 12, 2007 Share Posted September 12, 2007 No dice in my case - My taskbar is docked on the left instead of on the bottom, so the hardcoded location for the click fails, subsequently invalidating all Send() commands.No sweat. That was pretty much the worst way I could imagine shutting off the machine without asking my grandma to do it for me. Link to comment Share on other sites More sharing options...
Monamo Posted September 12, 2007 Share Posted September 12, 2007 No sweat. That was pretty much the worst way I could imagine shutting off the machine without asking my grandma to do it for me.Aye, not a method I'd ever utilize - just provided "error control" comments in case AlmarM wanted to expand on the script. - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] 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