Guest User

Inchizator

a guest
Aug 23rd, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.80 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6. Global $Form1 = GUICreate("Inchizator", 256, 132, 192, 124)
  7. Global $playhd = GUICtrlCreateLabel("PlayHD", 40, 8, 167, 37)
  8. GUICtrlSetFont(-1, 28, 800, 0, "! PEPSI !")
  9. GUICtrlSetColor(-1, 0xCDCDCD)
  10. Global $Input1 = GUICtrlCreateInput("1", 144, 48, 81, 21)
  11. Global $Label1 = GUICtrlCreateLabel("Timp", 112, 48, 27, 17)
  12. Global $Label2 = GUICtrlCreateLabel("min", 232, 48, 20, 17)
  13. Global $Button1 = GUICtrlCreateButton("OK", 104, 72, 145, 57)
  14. Global $Label3 = GUICtrlCreateLabel("o ora - 60 min", 16, 64, 68, 17)
  15. Global $Label4 = GUICtrlCreateLabel("3 ore - 180 min", 16, 85, 74, 17)
  16. Global $Label5 = GUICtrlCreateLabel("6 ore - 360 min", 16, 104, 74, 17)
  17. Global $Group1 = GUICtrlCreateGroup("INFO", 8, 48, 89, 81)
  18. Global $timp
  19. Global $test = 1
  20. GUICtrlCreateGroup("", -99, -99, 1, 1)
  21. GUISetState(@SW_SHOW)
  22.  
  23. While $test=1
  24.     $timp = GUICtrlRead($Input1)
  25.     $timp_s = $timp * 60
  26.     $timp_ms = $timp_s * 1000
  27.     $nMsg = GUIGetMsg()
  28.     Switch $nMsg
  29.         Case $GUI_EVENT_CLOSE
  30.             Exit
  31.         Case $Button1
  32.             If $timp = 0 Then
  33.                 $yorn = MsgBox(36,"WTF!?! 0 Min:-?","Vrei sa inchizi calculatorul acum?")
  34.                 If $yorn = 6 Then
  35.                     MsgBox(64,"END OF THE WORLD","Calculatorul se inchide in acum",5)
  36.                     $test=2
  37.                 Else
  38.                     $test=1
  39.                 EndIf  
  40.             Else
  41.                 MsgBox(64,"END OF THE WORLD","Calculatorul se inchide in "&$timp&" de minute ("&$timp_s&" sec).",5)
  42.                 $test=2
  43.             EndIf  
  44.     EndSwitch
  45. WEnd
  46.     If $test=2 Then
  47.         GUIDelete($form1)
  48.     If $timp>0 Then
  49.         TrayTip("Citeste-ma, Citeste-ma!!!","Daca vrei sa anulezi inchiderea"&@lf&"Dai click dreata pe iconita, si dai EXIT",7,1)
  50.     EndIf  
  51.         Sleep($timp_ms)
  52.         MsgBox(0,"We are all die >:)","BOOOOOOOOOOM",5)
  53.         Shutdown(5)
  54.     EndIf
Advertisement
Add Comment
Please, Sign In to add comment