Respond to this messageReturn to Index
Original Message
  • Here is the code...
    • (no login)
      Posted May 17, 2012 10:34 AM

      90% of it is for the GUI. For the actual sounds i just used a FOR...LOOP and a SOUND command




      hours = 0
      minutes = 0
      seconds = 0
      SCREEN _NEWIMAGE(1920, 1080, 32)
      f& = _LOADFONT("C:\WINDOWS\Fonts\Lucon.ttf", 21)
      _FONT f&

      DIM uptri(1000)
      LINE (100, 100)-(120, 80), _RGB(255, 255, 255)
      LINE (120, 80)-(140, 100), _RGB(255, 255, 255)
      LINE (100, 100)-(140, 100), _RGB(255, 255, 255)
      PAINT (125, 90), _RGB(255, 0, 0), _RGB(255, 255, 255)
      GET (100, 80)-(140, 100), uptri()

      DIM downtri(1000)
      LINE (100, 100)-(120, 120), _RGB(255, 255, 255)
      LINE (120, 120)-(140, 100), _RGB(255, 255, 255)
      LINE (100, 100)-(140, 100), _RGB(255, 255, 255)
      PAINT (125, 110), _RGB(255, 0, 0), _RGB(255, 255, 255)
      GET (100, 120)-(140, 100), downtri()


      CLS

      _SCREENMOVE 0, 0
      DO
      PRINT "At what time would you like me to alert you?"
      IF hours > 24 THEN hours = 0
      IF minutes > 59 THEN minutes = 0
      IF seconds > 59 THEN seconds = 0
      IF hours < 0 THEN hours = 24
      IF minutes < 0 THEN minutes = 59
      IF seconds < 0 THEN seconds = 59
      LOCATE 25, 795
      PRINT hours;
      PRINT " : ";
      LOCATE 25, 885
      PRINT minutes;
      PRINT " : ";
      LOCATE 25, 975
      PRINT seconds;
      LINE (1100, 470)-(1300, 570), _RGB(255, 0, 0), BF
      PUT (798, 470), uptri()
      PUT (888, 470), uptri()
      PUT (978, 470), uptri()
      PUT (798, 535), downtri()
      PUT (888, 535), downtri()
      PUT (978, 535), downtri()
      LOCATE 25, 1180
      PRINT "SET"
      IF _MOUSEX <= (978 + 40) AND _MOUSEX >= 978 AND _MOUSEY <= 555 AND _MOUSEY >= 535 AND left = 1 THEN
      seconds = seconds - 1
      _DELAY 0.10
      END IF
      IF _MOUSEX <= (798 + 40) AND _MOUSEX >= 798 AND _MOUSEY <= 555 AND _MOUSEY >= 535 AND left = 1 THEN
      hours = hours - 1
      _DELAY 0.10
      END IF
      IF _MOUSEX <= (888 + 40) AND _MOUSEX >= 888 AND _MOUSEY <= 555 AND _MOUSEY >= 535 AND left = 1 THEN
      minutes = minutes - 1
      _DELAY 0.10
      END IF
      IF _MOUSEX <= (978 + 40) AND _MOUSEX >= 978 AND _MOUSEY <= 490 AND _MOUSEY >= 470 AND left = 1 THEN
      seconds = seconds + 1
      _DELAY 0.10
      END IF
      IF _MOUSEX <= (798 + 40) AND _MOUSEX >= 798 AND _MOUSEY <= 490 AND _MOUSEY >= 470 AND left = 1 THEN
      hours = hours + 1
      _DELAY 0.10
      END IF
      IF _MOUSEX <= (888 + 40) AND _MOUSEX >= 888 AND _MOUSEY <= 490 AND _MOUSEY >= 470 AND left = 1 THEN
      minutes = minutes + 1
      _DELAY 0.10
      END IF
      _DISPLAY
      DO WHILE _MOUSEINPUT
      mousex = _MOUSEX
      mousey = _MOUSEY
      left = _MOUSEBUTTON(1) * -1
      LOOP


      CLS
      LOOP UNTIL mousex <= 1300 AND mousex >= 1100 AND mousey >= 470 AND mousey <= 570 AND left = 1
      _AUTODISPLAY

      DO
      _LIMIT 1
      CLS
      PRINT TIME$
      IF VAL(LEFT$(TIME$, 2)) = (hours) AND VAL(MID$(TIME$, 4, 2)) = (minutes) AND VAL(RIGHT$(TIME$, 2)) = (seconds) THEN
      FOR y = 1 TO 25
      FOR x = 1 TO 4

      SOUND 1500, 1
      NEXT x
      _DELAY 1
      NEXT y
      END IF
      _DELAY 1
      _DISPLAY
      LOOP
    Your Name
    Your Email
    (Optional)
    Message Title
    Message Text
    Options Also send responses to my email address
          


     Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement