Sign in to follow this  
Followers 0
AlmarM

Quit Windows :P

9 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#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.

Share this post


Link to post
Share on other sites

Or even create a shortcut on your desktop that runs: shutdown -s -t 0

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0