home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / sprint / bigclo.zip / BIGCLOCK.SPM
Text File  |  1988-12-11  |  11KB  |  344 lines

  1. ;                           B I G C L O C K
  2.  
  3. ;                                                       (c) 1988 Ralph Roberts
  4.  
  5. ; VERSION 1.1, 12/09/88. Improvements to BigClock include putting the time dis-
  6. ; play in register QP (a scratch register).  Thus, your document is not modifi-
  7. ; and then restored as Version 1 did--in fact, it is not touched at all. Should
  8. ; you have windows open, they will now be restored exactly also. 
  9.  
  10. ; A word about macro space. Sprint 1.0 has a limited amount  of space available
  11. ; for macros. Putting in long ones like BigClock  can eventually fill up it up.
  12. ; You can always reset by  choosing Reset Shortcuts  on the User Interface sub-
  13. ; menu of the Customize menu (ALT-C-U-R in the Borland Advance UI). Doing this,
  14. ; however, takes out ALL your macros. To make keeping permanent ones easy,  you
  15. ; need an "executive" macro like my KEYS.SPM described in COMPUTE!'S USING BOR-
  16. ; LAND'S SPRINT. Playing with macros like BigClock is worthwhile because of the
  17. ; insight into programming techniques they offer, and the fact that you can awe
  18. ; and astound your friends.  Would you have BELIEVED a word processor  could do
  19. ; what this macro lets Sprint do? 
  20.  
  21. ; BigClock is a BIG and I mean * * * B I G * * * clock. The display is 16 lines
  22. ; lines high by 80 columns wide. Seconds appear at the top of the screen &  the
  23. ; BigClock is updated every minute.  Pressing any key (except ESC) will restore
  24. ; your file exactly... Sprint is POWERFUL and this is another excellent example
  25. ; of that power. Let's see WordStar or WordPerfect do this!!... Please remember
  26. ; that for accurate time your computer's DOS clock  must be set right using the
  27. ; TIME utility built into DOS (many computers now do this automatically for you
  28. ; through "on board" clocks.
  29.  
  30. ; If you want to make the display even better, do a global search and change of
  31. ; this macro, changing all '#' to ASCII character 219 (a solid block).
  32.  
  33. ; TO INSTALL:  To put this macro into Sprint,  simply load this  file, exactly
  34. ; as it is. If there is a ruler at the top, remove it. Then type the ALT-U-M-R
  35. ; key combination and this macro will be compiled. Next, use the ALT-U-M-E key
  36. ; combination. When it reads, "Enter Macro:"  on the status line at the bottom
  37. ; of your screen, type in the  name  "BIGCLOCK"  and hit the <ENTER> key.  You
  38. ; may  then  either  execute your new macro, or assign it  to  a  key  or  key
  39. ; combination for ease-of-use in the future. Enjoy!
  40.  
  41. ; Ralph Roberts,  the author of this macro,  also wrote the comprehensive book,
  42. ; COMPUTE!'S USING BORLAND'S SPRINT.  Autographed copies of this  100,000-word+
  43. ; book are now available for the retail price of $16.95 (ppd)  from  the author
  44. ; at: P.O. Box 8549, Asheville, North Carolina 28814.
  45.  
  46. one:
  47.     toeol "    ####        " c
  48.     toeol "    ####        " c
  49.     toeol "  ######        " c
  50.     toeol "  ######        " c
  51.     toeol "    ####        " c
  52.     toeol "    ####        " c
  53.     toeol "    ####        " c
  54.     toeol "    ####        " c
  55.     toeol "    ####        " c
  56.     toeol "    ####        " c
  57.     toeol "    ####        " c
  58.     toeol "    ####        " c
  59.     toeol "    ####        " c
  60.     toeol "    ####        " c
  61.     toeol "############    " c
  62.     toeol "############    " c
  63.  
  64. two:
  65.     toeol "  ########      " c
  66.     toeol "  ########      " c
  67.     toeol "####    ####    " c
  68.     toeol "####    ####    " c
  69.     toeol "        ####    " c
  70.     toeol "        ####    " c
  71.     toeol "        ####    " c
  72.     toeol "    ######      " c
  73.     toeol "    ######      " c
  74.     toeol "  ####          " c
  75.     toeol "  ####          " c
  76.     toeol "####            " c
  77.     toeol "####    ####    " c
  78.     toeol "####    ####    " c
  79.     toeol "############    " c
  80.     toeol "############    " c
  81.  
  82. three:
  83.     toeol "  ########      " c
  84.     toeol "  ########      " c
  85.     toeol "####    ####    " c
  86.     toeol "####    ####    " c
  87.     toeol "        ####    " c
  88.     toeol "        ####    " c
  89.     toeol "        ####    " c
  90.     toeol "    ######      " c
  91.     toeol "    ######      " c
  92.     toeol "        ####    " c
  93.     toeol "        ####    " c
  94.     toeol "        ####    " c
  95.     toeol "####    ####    " c
  96.     toeol "####    ####    " c
  97.     toeol "  ########      " c
  98.     toeol "  ########      " c
  99.  
  100. four:
  101.     toeol "      ######    " c
  102.     toeol "      ######    " c
  103.     toeol "    ########    " c
  104.     toeol "    ########    " c
  105.     toeol "  ####  ####    " c
  106.     toeol "  ####  ####    " c
  107.     toeol "####    ####    " c
  108.     toeol "####    ####    " c
  109.     toeol "##############  " c
  110.     toeol "##############  " c
  111.     toeol "        ####    " c
  112.     toeol "        ####    " c
  113.     toeol "        ####    " c
  114.     toeol "        ####    " c
  115.     toeol "      ########  " c
  116.     toeol "      ########  " c
  117.  
  118. five:
  119.     toeol "############    " c
  120.     toeol "############    " c
  121.     toeol "####            " c
  122.     toeol "####            " c
  123.     toeol "####            " c
  124.     toeol "##########      " c
  125.     toeol "##########      " c
  126.     toeol "        ####    " c
  127.     toeol "        ####    " c
  128.     toeol "        ####    " c
  129.     toeol "        ####    " c
  130.     toeol "        ####    " c
  131.     toeol "####    ####    " c
  132.     toeol "####    ####    " c
  133.     toeol "  ########      " c
  134.     toeol "  ########      " c
  135.  
  136. six:
  137.     toeol " ######      " c
  138.     toeol "    ######      " c
  139.     toeol "  ####          " c
  140.     toeol "  ####          " c
  141.     toeol "####            " c
  142.     toeol "####            " c
  143.     toeol "####            " c
  144.     toeol "##########      " c
  145.     toeol "##########      " c
  146.     toeol "####    ####    " c
  147.     toeol "####    ####    " c
  148.     toeol "####    ####    " c
  149.     toeol "####    ####    " c
  150.     toeol "####    ####    " c
  151.     toeol "  ########      " c
  152.     toeol "  ########      " c
  153.  
  154. seven:
  155.     toeol "###########     " c
  156.     toeol "###########     " c
  157.     toeol "###    ####     " c
  158.     toeol "###    ####     " c
  159.     toeol "       ####     " c
  160.     toeol "       ####     " c
  161.     toeol "       ####     " c
  162.     toeol "     ####       " c
  163.     toeol "     ####       " c
  164.     toeol "   ####         " c
  165.     toeol "   ####         " c
  166.     toeol "   ####         " c
  167.     toeol "   ####         " c
  168.     toeol "   ####         " c
  169.     toeol "   ####         " c
  170.     toeol "   ####         " c
  171.  
  172. eight:
  173.     toeol "  ########      " c
  174.     toeol "  ########      " c
  175.     toeol "####    ####    " c
  176.     toeol "####    ####    " c
  177.     toeol "####    ####    " c
  178.     toeol "####    ####    " c
  179.     toeol "####    ####    " c
  180.     toeol "  ########      " c
  181.     toeol "  ########      " c
  182.     toeol "####    ####    " c
  183.     toeol "####    ####    " c
  184.     toeol "####    ####    " c
  185.     toeol "####    ####    " c
  186.     toeol "####    ####    " c
  187.     toeol "  ########      " c
  188.     toeol "  ########      " c
  189.  
  190. nine:
  191.     toeol "  ########      " c
  192.     toeol "  ########      " c
  193.     toeol "####    ####    " c
  194.     toeol "####    ####    " c
  195.     toeol "####    ####    " c
  196.     toeol "####    ####    " c
  197.     toeol "####    ####    " c
  198.     toeol "  ##########    " c
  199.     toeol "  ##########    " c
  200.     toeol "        ####    " c
  201.     toeol "        ####    " c
  202.     toeol "        ####    " c
  203.     toeol "      ####      " c
  204.     toeol "      ####      " c
  205.     toeol "  ######        " c
  206.     toeol "  ######        " c
  207.  
  208. zero:
  209.     toeol "  ##########    " c
  210.     toeol "  ##########    " c
  211.     toeol "####      ####  " c
  212.     toeol "####      ####  " c
  213.     toeol "####      ####  " c
  214.     toeol "####    ######  " c
  215.     toeol "####    ######  " c
  216.     toeol "####  ########  " c
  217.     toeol "####  ########  " c
  218.     toeol "########  ####  " c
  219.     toeol "########  ####  " c
  220.     toeol "######    ####  " c
  221.     toeol "######    ####  " c
  222.     toeol "######    ####  " c
  223.     toeol "  ##########    " c
  224.     toeol "  ##########    " c
  225.  
  226. colon:
  227.     toeol "" c
  228.     toeol "                " c
  229.     toeol "    ####        " c
  230.     toeol "    ####        " c
  231.     toeol "    ####        " c
  232.     toeol "    ####        " c
  233.     toeol "    ####        " c
  234.     toeol "                " c
  235.     toeol "                " c
  236.     toeol "                " c
  237.     toeol "                " c
  238.     toeol "    ####        " c
  239.     toeol "    ####        " c
  240.     toeol "    ####        " c
  241.     toeol "    ####        " c
  242.     toeol "    ####        " c
  243.  
  244.  
  245. getnumber:
  246.         if current = 48 (down down zero draw)
  247.         if current = 49 (down down one draw)
  248.         if current = 50 (down down two draw)
  249.         if current = 51 (down down three draw)
  250.         if current = 52 (down down four draw)
  251.         if current = 53 (down down five draw)
  252.         if current = 54 (down down six draw)
  253.         if current = 55 (down down seven draw)
  254.         if current = 56 (down down eight draw)
  255.         if current = 57 (down down nine draw)
  256.         if current = 58 (down down colon draw)
  257.  
  258. clearit:
  259.         r c r c del del del
  260.         down down tosol deletelineend
  261.         15 repeat (down tosol deletelineend)
  262.         r toend 
  263.  
  264. ticktockticktock:
  265.  
  266.     while !keypressed (
  267.                tosol deletelineend
  268.                time 2 put "%02d:" 
  269.                time 1 put "%02d:"
  270.                time 0 put "%02d"
  271.                draw
  272.                r c r c if current = 48
  273.                (f c if current = 48 
  274.                        (clearit
  275.                         bell set 
  276.                         tosol
  277.                         getnumber f
  278.                         r toend 
  279.                         tosol c getnumber
  280.                         r toend 
  281.                         tosol c c getnumber
  282.                         r toend 
  283.                         tosol c c c getnumber
  284.                         r toend 
  285.                         tosol c c c c getnumber
  286.                         r toend 
  287.                         tosol c c c c c getnumber
  288.                         r toend 
  289.                         1100 wait))   r toend)
  290.  
  291. bigclock:
  292.     set qp ""
  293.     1 -> zoom
  294.     mark {to qp
  295.     int rawsave
  296.     int statsave
  297.     Statline -> Statsave
  298.     raw-> rawsave 0-> raw
  299.     mark {r toend
  300.     message "\n       Press any key EXCEPT <Esc> to end and your screen will"
  301.                " be restored)."
  302.     dline = 1 dcolumn= 0
  303.     19 repeat insert " ^J"
  304.     78 repeat (insert "_")
  305.     insert "^J"
  306.  insert
  307.  "         ^BB I G C L O C K^N                           (c) 1988 Ralph Roberts^J^J"
  308.  insert
  309.  "A demo of Sprint's incredible POWER by Ralph Roberts,^J"
  310.  insert
  311.  "                   author of the book: ^BCOMPUTE!'S USING BORLAND'S SPRINT^N.^J"
  312.  
  313.  
  314.     r toend
  315.  
  316.          tosol time 2 put "%02d:" 
  317.                time 1 put "%02d"
  318.                "    ^B * Winding the BigClock * ^N" draw
  319.  
  320.         tosol
  321.         getnumber f
  322.         r toend 
  323.         tosol c getnumber
  324.         r toend 
  325.         tosol c c getnumber
  326.         r toend 
  327.         tosol c c c getnumber
  328.         r toend 
  329.         tosol c c c c getnumber
  330.         r toend 
  331.         tosol c c c c c getnumber
  332.         r toend 
  333.                
  334.  
  335.     ticktockticktock
  336.    
  337.    key
  338.  
  339.    r toend 
  340.    24 repeat deleteline
  341.    0-> statline      
  342.    1-> statline
  343.    0 -> zoom draw}}
  344.