Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon ; Ocultar ícone do relógio
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #include <Sound.au3> ; include importante
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("Despert Now", 441, 108, 242, 160)
- GUISetBkColor(0x008000)
- $Label1 = GUICtrlCreateLabel("Tempo:", 24, 24, 63, 24)
- GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
- $Hora = GUICtrlCreateInput("Hora", 88, 24, 65, 21)
- $Label2 = GUICtrlCreateLabel(":", 160, 24, 9, 24)
- GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
- $Minutos = GUICtrlCreateInput("Minutos", 176, 24, 73, 21)
- $Button1 = GUICtrlCreateButton("Iniciar", 192, 48, 59, 25, $WS_GROUP)
- $Button2 = GUICtrlCreateButton("Selecionar Música", 304, 56, 97, 25, $WS_GROUP)
- $Button3 = GUICtrlCreateButton("Developer", 304, 24, 97, 25, $WS_GROUP)
- $Group1 = GUICtrlCreateGroup("Configurações", 16, 8, 409, 81)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button2
- $opendialog = FileOpenDialog ( "Open Music...", @ScriptDir, "Music (*.*)") ; abre o arquivo
- Case $Button1
- MsgBox(0,"Atenção","O cronômetro já está rodando, ele irá funcionar de acordo com a hora da sua máquina!")
- $horas = GUICtrlRead($Hora)
- $minutos = GUICtrlRead($Minutos)
- Do
- If @HOUR = $horas and @MIN = $minutos Then _SoundPlay($opendialog)
- Until @HOUR = $horas and @MIN = $minutos
- _SoundPlay($opendialog)
- MsgBox(0,"Time Over!","Seu tempo acabou ! :/")
- Case $Button3
- MsgBox(0,"Créditos","Desenvolvido por : Allysson Brenner")
- EndSwitch
- WEnd
- ; Programa desenvolvido por Allysson Brenner | Disponibilizado para estudos apenas para o fórum oficial de AutoIt no Brasil !
- ; | 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