;-- Fast Shutdown -- by Nod5
;-- v090426
;-- does a onestep windows shutdown unless there are scheduled tasks later the same day
;-- default hotkeys: (middle click on Start button) OR (Right Shift + Escape)

A quick script for Win XP that I needed myself. ahk & exe in attached zip. I'll package it nicer later.
b48b1bb31a479ac4a3467f5f9297c77f *FastShutdown.ahk
e388781005816e81f7e4d92086a9d2e6 *FastShutdown.exe
;-- v090426
;-- does a onestep windows shutdown unless there are scheduled tasks later the same day
;-- default hotkeys: (middle click on Start button) OR (Right Shift + Escape)

A quick script for Win XP that I needed myself. ahk & exe in attached zip. I'll package it nicer later.
b48b1bb31a479ac4a3467f5f9297c77f *FastShutdown.ahk
e388781005816e81f7e4d92086a9d2e6 *FastShutdown.exe
Code
;-- Fast Shutdown -- by Nod5
;-- v090426
;-- does a onestep windows shutdown unless there are scheduled tasks later the same day
;-- default hotkeys: (middle click on Start button) OR (Right Shift + Escape)
#singleinstance, force
~Mbutton::
MouseGetPos,,,xxid, xxcontr
WinGetClass, xxstart, ahk_id %xxid%
if xxstart = Shell_TrayWnd ;-- if mouse over start button
if xxcontr = Button1
goto fastshutdown
return
RShift & Esc::
fastshutdown:
xout =
xvar =
x = %A_Temp%\%A_now%.txt
RunWait %comspec% /c "schtasks > "%x%"",,Hide
FileRead, xvar, %x%
FileDelete, %x%
Loop, Parse, xvar, `n, `r
{
if A_LoopField contains %A_YYYY%-%A_MM%-%A_DD%
xout = %xout%`n%A_Loopfield%
}
if xout !=
{
MsgBox, 1, Fast Shutdown, %xout%`n`nReally shutdown?
IfMsgBox, OK
Shutdown, 1
}
else
{
MsgBox, 1, Fast Shutdown, Shutdown in 5 seconds...,5
IfMsgBox, OK
Shutdown, 1
IfMsgbox, Timeout
Shutdown, 1
}
return






):
)
: