home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / facts3.1_clocksync / rexx / facts.miami < prev    next >
Text File  |  1999-12-29  |  779b  |  52 lines

  1. /*
  2. ** $VER: Facts_miami.rexx 0.002 (24.12.99) © Gian Maria Calzolari <gcalzo@geocities.com>
  3. **
  4. **
  5. **  FUNCTION:
  6. **      Sets time from internet using Facts
  7. **
  8. ** $HISTORY:
  9. **
  10. ** 24 Dec 1999 : 000.002 : Added errors checking and messages
  11. ** 22 Dec 1999 : 000.001 : first attempt
  12. **
  13. */
  14.  
  15. mport = 'MIAMI.1'
  16. fport = 'FACTS'
  17. options results
  18.  
  19. x=show('Ports',mport)
  20.  
  21. if (x~=1) then do
  22.    ExitMsg("Miami is not started!", 20)
  23. end
  24.  
  25. x=show('Ports',fport)
  26.  
  27. if (x~=1) then do
  28.    ExitMsg("Facts is not started!", 20)
  29. end
  30.  
  31. address value mport
  32.  
  33. ISONLINE
  34.  
  35. if (rc~=1) then
  36.    ExitMsg("Miami is not online!", 10)
  37.  
  38. address value fport
  39. SETTIME
  40. exit rc
  41.  
  42. /* Game Over */
  43.  
  44.  
  45.  
  46. /* Exit with a message */
  47. ExitMsg:
  48.     address command
  49.     'RequestChoice >NIL: "Facts.miami" "'arg(1)'" "OK :-("'
  50. exit arg(2)
  51.  
  52.