Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.43 KB | None | 0 0
  1. MsgBox(0+64,"DISCALMER",'Although it says "Ramen Timer", use it for things other than ramen.')
  2. GUICreate("Ramen Timer", 400, 300, 200, 100)
  3. GUISetState(@SW_SHOW)
  4. $timer = GUICtrlCreateLabel("   Ramen Timer",0,0,400,100)
  5. GUICtrlSetFont($timer, 36, 450, 2 , "Tahoma")
  6. $file = GUICtrlCreateMenu("File")
  7. $start = GUICtrlCreateMenuitem("Start!   Alt+S",$file)
  8. $help = GUICtrlCreateMenu("Help")
  9. $about = GUICtrlCreateMenuitem("About...",$help)
  10. $exit = GUICtrlCreateMenuitem("Exit!   Alt+F4",$file)
  11. GUICtrlCreateLabel("Minutes",100,80,100,20)
  12. $naka = GUICtrlCreateInput("3",100,100,100,20)
  13. GUICtrlCreateUpdown($naka)
  14. GUICtrlCreateLabel("Seconds",200,80,100,20)
  15. $nuka = GUICtrlCreateInput("0",200,100,100,20)
  16. GUICtrlCreateUpdown($nuka)
  17. $heading = GUICtrlCreateInput("Note to self...",0, 200, 400, 20)
  18. GUICtrlCreateLabel("Input the heading for the reminder.", 0, 175, 400, 20)
  19. $message = GUICtrlCreateInput("...check on ramen.",0, 250, 400, 20)
  20. GUICtrlCreateLabel("Input the message for the reminder.", 0, 225, 400, 20)
  21. $example = GUICtrlCreateButton("Display Message",140 , 135, 100, 25)
  22. HotKeySet("!s","start")
  23. $naki = GUICtrlRead($naka)
  24. $nuki = GUICtrlRead($nuka)
  25. Break(0)
  26.  
  27. While 1
  28.     $msg = GUIGetMsg()
  29.         if $msg = $GUI_EVENT_CLOSE Then
  30.             ExitLoop
  31.         EndIf
  32.         if $msg = $start Then
  33.             $min = GUICtrlRead($naka)*60000
  34.             $sec = GUICtrlRead($nuka)*1000
  35.             MsgBox(0+64,"Notice","Set timer to: " & $min/60000 & " min." & $sec/1000 & " sec.")
  36.             GUISetState(@SW_HIDE)
  37.             Sleep($min + $sec)
  38.             GUISetState(@SW_SHOW)
  39.             MsgBox(0+64,GUICtrlRead($heading),GUICtrlRead($message))
  40.         EndIf
  41.         if $msg = $about Then
  42.             MsgBox(0, "Timer", "Created by David Nuon. © 2007")
  43.         EndIf
  44.         if $msg = $exit Then
  45.             ExitLoop
  46.         EndIf
  47.         if $msg = $example Then
  48.             MsgBox(0+64,GUICtrlRead($heading),GUICtrlRead($message))
  49.             MsgBox(0+64,"Hey","That is what the reminder will look like")
  50.         EndIf
  51.     WEnd
  52.  
  53. GUIDelete()
  54. Func start()
  55.             $min = GUICtrlRead($naka)*60000
  56.             $sec = GUICtrlRead($nuka)*1000
  57.             MsgBox(0+64,"Notice","Set timer to: " & $min/60000 & " min." & $sec/1000 & " sec.")
  58.             GUISetState(@SW_HIDE)
  59.             Sleep($min + $sec)
  60.             GUISetState(@SW_SHOW)
  61.             MsgBox(0+64,GUICtrlRead($heading),GUICtrlRead($message))
  62. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement