Siccome nessuno ha postato questo tipo di programma ho pensato di postarlo io. Solo che c'e' un piccolo ma fastidioso problema... Il tempo bisogna inserirlo in millisecondi
#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <staticconstants.au3>
#include <windowsconstants.au3>
#Region ### START Koda GUI section ### Form=
$ShutDownTm = GUICreate("ShutDown Timer", 362, 247, 234, 250)
$ShutDown = GUICtrlCreateButton("ShutDown", 24, 120, 89, 33)
$Restart = GUICtrlCreateButton("Restart", 136, 120, 89, 33)
$LogOff = GUICtrlCreateButton("LogOff", 256, 120, 89, 33)
$Hibernate = GUICtrlCreateButton("Hibernate", 72, 168, 89, 33)
$Standby = GUICtrlCreateButton("Standby", 192, 168, 89, 33)
$Functions = GUICtrlCreateGroup("Functions", 8, 104, 345, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group1 = GUICtrlCreateGroup("Timer", 24, 24, 305, 57)
$Input1 = GUICtrlCreateInput("", 48, 48, 257, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Write = GUICtrlCreateLabel("Write Time in MS", 104, 0, 189, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ShutDown
$ShutDownTimer = GUICtrlRead ($Input1)
MsgBox (0, "Shutdown", "Timer Started!")
Sleep ($ShutDownTimer)
Shutdown (1)
Case $Restart
$RestartTimer = GUICtrlRead ($Input1)
MsgBox (0, "Restart", "Timer Started!")
Sleep ($RestartTimer)
Shutdown (2)
Case $LogOff
$LogOffTimer = GUICtrlRead ($Input1)
MsgBox (0, "LogOff", "Timer Started!")
Sleep ($LogOffTimer)
Shutdown (0)
Case $Hibernate
$HibernateTimer = GUICtrlRead ($Input1)
MsgBox (0, "Hibernate", "Timer Started!")
Sleep ($HibernateTimer)
Shutdown (64)
Case $Standby
$StandbyTimer = GUICtrlRead ($Input1)
MsgBox (0, "Standby", "Timer Started!")
Sleep ($StandbyTimer)
Shutdown (32)
EndSwitch
WEnd