Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MsgBox(0+64,"DISCALMER",'Although it says "Ramen Timer", use it for things other than ramen.')
- GUICreate("Ramen Timer", 400, 300, 200, 100)
- GUISetState(@SW_SHOW)
- $timer = GUICtrlCreateLabel(" Ramen Timer",0,0,400,100)
- GUICtrlSetFont($timer, 36, 450, 2 , "Tahoma")
- $file = GUICtrlCreateMenu("File")
- $start = GUICtrlCreateMenuitem("Start! Alt+S",$file)
- $help = GUICtrlCreateMenu("Help")
- $about = GUICtrlCreateMenuitem("About...",$help)
- $exit = GUICtrlCreateMenuitem("Exit! Alt+F4",$file)
- GUICtrlCreateLabel("Minutes",100,80,100,20)
- $naka = GUICtrlCreateInput("3",100,100,100,20)
- GUICtrlCreateUpdown($naka)
- GUICtrlCreateLabel("Seconds",200,80,100,20)
- $nuka = GUICtrlCreateInput("0",200,100,100,20)
- GUICtrlCreateUpdown($nuka)
- $heading = GUICtrlCreateInput("Note to self...",0, 200, 400, 20)
- GUICtrlCreateLabel("Input the heading for the reminder.", 0, 175, 400, 20)
- $message = GUICtrlCreateInput("...check on ramen.",0, 250, 400, 20)
- GUICtrlCreateLabel("Input the message for the reminder.", 0, 225, 400, 20)
- $example = GUICtrlCreateButton("Display Message",140 , 135, 100, 25)
- HotKeySet("!s","start")
- $naki = GUICtrlRead($naka)
- $nuki = GUICtrlRead($nuka)
- Break(0)
- While 1
- $msg = GUIGetMsg()
- if $msg = $GUI_EVENT_CLOSE Then
- ExitLoop
- EndIf
- if $msg = $start Then
- $min = GUICtrlRead($naka)*60000
- $sec = GUICtrlRead($nuka)*1000
- MsgBox(0+64,"Notice","Set timer to: " & $min/60000 & " min." & $sec/1000 & " sec.")
- GUISetState(@SW_HIDE)
- Sleep($min + $sec)
- GUISetState(@SW_SHOW)
- MsgBox(0+64,GUICtrlRead($heading),GUICtrlRead($message))
- EndIf
- if $msg = $about Then
- MsgBox(0, "Timer", "Created by David Nuon. © 2007")
- EndIf
- if $msg = $exit Then
- ExitLoop
- EndIf
- if $msg = $example Then
- MsgBox(0+64,GUICtrlRead($heading),GUICtrlRead($message))
- MsgBox(0+64,"Hey","That is what the reminder will look like")
- EndIf
- WEnd
- GUIDelete()
- Func start()
- $min = GUICtrlRead($naka)*60000
- $sec = GUICtrlRead($nuka)*1000
- MsgBox(0+64,"Notice","Set timer to: " & $min/60000 & " min." & $sec/1000 & " sec.")
- GUISetState(@SW_HIDE)
- Sleep($min + $sec)
- GUISetState(@SW_SHOW)
- MsgBox(0+64,GUICtrlRead($heading),GUICtrlRead($message))
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement