Jump to content

Time4Shutdown 1.0

   (2 reviews)

1 Screenshot

About This File

Very simple timer, input the minutes for the shutdown, and click start, the countdown will start, and a tip will appear in the upper left part of the screen, when it reaches 0 it shutsdown, to cancel the schedule, just close the app.

You can also, at anytime press reboot to reboot immediately.


User Feedback

You may only provide a review once you have downloaded the file.


careca

· Edited by careca

   0 of 1 member found this review helpful 0 / 1 member
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Resources\Clock.ico
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Icon_Add=Resources\Clock.ico
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
Opt("TrayAutoPause", 0)
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Time4Shutdown", 395, 32, 250, 475, -1, $WS_EX_DLGMODALFRAME)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$settime = GUICtrlCreateInput("", 168, 5, 49, 21)
$Label1 = GUICtrlCreateLabel("Set time for shutdown in minutes", 8, 8, 156, 17)
$Button1 = GUICtrlCreateButton("Start", 234, 3, 75, 25)
GUICtrlSetOnEvent($Button1, "Start")
$Button2 = GUICtrlCreateButton("Reboot", 314, 3, 75, 25)
GUICtrlSetOnEvent($Button2, "Reboot")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Func Start()
    GUISetState(@SW_HIDE)
    $time = GUICtrlRead($settime, 1)
    $timetosleep = $time * 60
    Do
        ToolTip($timetosleep & ' Seconds Remanining', 300, 0)
        Sleep(995)
        $timetosleep -= 1
    Until $timetosleep <= 0
    ToolTip("")
    Shutdown(13)
    Exit
EndFunc   ;==>Start

Func Reboot()
    Local $iMsgBoxAnswer
    $iMsgBoxAnswer = MsgBox(4164, "Notice", "Do you really want to reboot?")
    Select
        Case $iMsgBoxAnswer = 6 ;Yes
        Case $iMsgBoxAnswer = 7 ;No
    EndSelect
    If $iMsgBoxAnswer = 6 Then
        MsgBox(4096, "Notice", "Clicked Yes! Going to reboot")
        Shutdown(6)
    ElseIf $iMsgBoxAnswer = 7 Then
        MsgBox(4096, "Notice", "Clicked No! Aborting reboot")
    EndIf
EndFunc   ;==>Reboot

Func Close()
    Exit
EndFunc   ;==>Close

Do
    Sleep(100)
Until $Form1 = $GUI_EVENT_CLOSE

 

Link to review
Bilgus

· Edited by Bilgus

  

Just an exe -- no source not running it.

source is here:

 

Link to review
×
×
  • Create New...