Advertisement
Guest User

Despert Now 0.1 by : Brenner

a guest
Aug 8th, 2011
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. #NoTrayIcon ; Ocultar ícone do relógio
  2. #include <ButtonConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <WindowsConstants.au3>
  5. #include <Sound.au3> ; include importante
  6.  
  7.  
  8. #Region ### START Koda GUI section ### Form=
  9. $Form1 = GUICreate("Despert Now", 441, 108, 242, 160)
  10. GUISetBkColor(0x008000)
  11. $Label1 = GUICtrlCreateLabel("Tempo:", 24, 24, 63, 24)
  12. GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
  13. $Hora = GUICtrlCreateInput("Hora", 88, 24, 65, 21)
  14. $Label2 = GUICtrlCreateLabel(":", 160, 24, 9, 24)
  15. GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
  16. $Minutos = GUICtrlCreateInput("Minutos", 176, 24, 73, 21)
  17. $Button1 = GUICtrlCreateButton("Iniciar", 192, 48, 59, 25, $WS_GROUP)
  18. $Button2 = GUICtrlCreateButton("Selecionar Música", 304, 56, 97, 25, $WS_GROUP)
  19. $Button3 = GUICtrlCreateButton("Developer", 304, 24, 97, 25, $WS_GROUP)
  20. $Group1 = GUICtrlCreateGroup("Configurações", 16, 8, 409, 81)
  21. GUICtrlCreateGroup("", -99, -99, 1, 1)
  22. GUISetState(@SW_SHOW)
  23. #EndRegion ### END Koda GUI section ###
  24.  
  25. While 1
  26. $nMsg = GUIGetMsg()
  27. Switch $nMsg
  28. Case $GUI_EVENT_CLOSE
  29. Exit
  30.  
  31. Case $Button2
  32. $opendialog = FileOpenDialog ( "Open Music...", @ScriptDir, "Music (*.*)") ; abre o arquivo
  33.  
  34. Case $Button1
  35. MsgBox(0,"Atenção","O cronômetro já está rodando, ele irá funcionar de acordo com a hora da sua máquina!")
  36. $horas = GUICtrlRead($Hora)
  37. $minutos = GUICtrlRead($Minutos)
  38. Do
  39. If @HOUR = $horas and @MIN = $minutos Then _SoundPlay($opendialog)
  40. Until @HOUR = $horas and @MIN = $minutos
  41. _SoundPlay($opendialog)
  42. MsgBox(0,"Time Over!","Seu tempo acabou ! :/")
  43.  
  44. Case $Button3
  45. MsgBox(0,"Créditos","Desenvolvido por : Allysson Brenner")
  46.  
  47. EndSwitch
  48. WEnd
  49.  
  50.  
  51. ; Programa desenvolvido por Allysson Brenner | Disponibilizado para estudos apenas para o fórum oficial de AutoIt no Brasil !
  52. ; | www.autoitbrasil.com | Se você mexe com a linguagem entre para a nossa família :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement