Jump to content

Search the Community

Showing results for tags 'shutdown timer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi ppl, i created this because i felt the need for it, what it does is shutdown the computer after X minutes, set by the user. So it's basically a small gui, with an input box, to write the number of minutes to wait before shutdown, and a button to start the count, and a reboot button, just because i felt the need for it. #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=ResourcesClock.ico #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_Icon_Add=ResourcesClock.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 ### $Multiplier = "60000" Func Start() GUISetState(@SW_HIDE) $time = GUICtrlRead($settime, 1) MsgBox(4096, "Shutdown notice", "Set to shutdown in: " & $time & " minutes.") $timetosleep = $time * $Multiplier Sleep($timetosleep) Shutdown(13) 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 UPDATE: Removed close button, and added a reboot button, optional message boxes in reboot function. Greetings. Time4Shutdown.au3
×
×
  • Create New...