#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile_type=a3x
#AutoIt3Wrapper_icon=..\Documents\Untitled - 1.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.4.0
 Author:        ScarfacePH

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

HotKeySet("!s", "_Exit")
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>


$Form1 = GUICreate("PC Sleeper", 282, 210, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("  10 min", 56, 28, 89, 25)
$Checkbox2 = GUICtrlCreateCheckbox("  20 min", 56, 56, 81, 25)
$Checkbox3 = GUICtrlCreateCheckbox("  30 min", 56, 80, 81, 33)
$Checkbox4 = GUICtrlCreateCheckbox("  45 min", 56, 112, 81, 25)
$Checkbox5 = GUICtrlCreateCheckbox("  60 min", 152, 28, 81, 25)
$Checkbox6 = GUICtrlCreateCheckbox("  90 min", 152, 56, 81, 25)
$Checkbox7 = GUICtrlCreateCheckbox(" 120 min", 152, 80, 81, 33)
$Checkbox8 = GUICtrlCreateCheckbox(" 150 min", 152, 112, 81, 25)
$Beenden = GUICtrlCreateButton("Beenden", 16, 144, 105, 33, $WS_GROUP)
$Starten = GUICtrlCreateButton("Sarten", 144, 144, 105, 33, $WS_GROUP)
GUISetState(@SW_SHOW)



While 1


	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

		Case $Beenden
			Exit
		Case $Starten



			if GUICtrlRead ($Checkbox1) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 10 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

					TrayTip("","10 Minuten.", 5)

						$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox2) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 20 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","20 Minuten.", 5)
				Sleep(600000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox3) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 30 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","30 Minuten.", 5)
				Sleep(1200000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Sleep(1800000)
				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox4) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 45 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","45 Minuten.", 5)
				Sleep(2100000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox5) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 60 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","60 Minuten.", 5)
				Sleep(3000000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox6) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 90 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","90 Minuten.", 5)
				Sleep(4800000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox7) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 120 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","120 Minuten.", 5)
				Sleep(6600000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf

			if GUICtrlRead ($Checkbox8) = $GUI_CHECKED then
GUISetState(@SW_HIDE)
				$PcSleeper = GUICreate("Pc Sleeper", 600, 87, 15, 192)
				$Zeitangabe = GUICtrlCreateLabel("Der Pc fährt sich in 150 Minuten herunter!", 8, 24, 835, 52)
				GUICtrlSetFont(-1, 32, 400, 0, "MS Sans Serif")
				GUISetState(@SW_SHOW)
				Sleep(4000)
				GUISetState(@SW_HIDE)

				TrayTip("","150 Minuten.", 5)
				Sleep(8400000)
				$z = 10
						While $z >= 0
								TrayTip("",$z & " Minuten.", 5)
								$z = $z - 1
								Sleep(60000)
						WEnd

				Shutdown (12)
			EndIf


	EndSwitch
WEnd


Func _Exit()
	Exit
EndFunc

