home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / sprint / stats.spm < prev    next >
Text File  |  1994-03-05  |  3KB  |  70 lines

  1. ;                          HANDY SPRINT STATISTICS
  2.  
  3. ;                                                       (c) 1988 Ralph Roberts
  4.  
  5. ;   This macro pops up an  infobox that gives  you NINETEEN useful  statistics
  6. ; such as how many files you have open--an  omission  that bugged me  first in
  7. ; Finalword and, until now,  in Sprint. Nothing more irritating then trying to
  8. ; open another  file and getting a concentration-breaking error message.  Now,
  9. ; you'll  be able to keep track.  Other useful stats  are given also,  such as
  10. ; which printer is selected, what the justification is, the indent, tab space,
  11. ; and so on. Assign this to a key or key combination--you'll use it often.
  12.  
  13. ;   TO INSTALL: To put this macro into Sprint, simply load this  file, exactly
  14. ; as it is. If there is a ruler at the top, remove it. Then type the ALT-U-M-R
  15. ; key combination and this macro will be compiled. Next, use the ALT-U-M-E key
  16. ; combination. When it reads, "Enter Macro:"  on the status line at the bottom
  17. ; of your screen,  type in the  name  "STATS"  and hit the <ENTER> key.  You
  18. ; may  then  either  execute your new macro, or assign it  to  a  key  or  key
  19. ; combination for ease-of-use in the future. Enjoy!
  20. ;   Express permission for the use and even publication of this macro is here-
  21. ; by granted PROVIDED that it is properly attributed to Ralph Roberts and that
  22. ; he is mentioned as the author of COMPUTE!'S USING BORLAND'S SPRINT.
  23. ;   Autographed copies of the  above over 100,000-word book are  available for
  24. ; the retail price of $17.95 (ppd) from the author at P.O. Box 8549, Asheville
  25. ; North Carolina 28814.
  26.  
  27.  
  28. JustifyIsWhat:
  29.    justify
  30.    if justify = 0 set QD "Left-Ragged"
  31.    if justify = 1 set QD "Left-Block"
  32.    if justify = 2 set QD "Center-Ragged"
  33.    if justify = 3 set QD "Center-Block"
  34.    if justify = 4 set QD "Right-Ragged"
  35.    if justify = 5 set QD "Right-Block"
  36.  
  37.  
  38. Stats:
  39.    set qd printer
  40.    if !length qd set qd "DEFAULT"
  41.    2-> statline 
  42.    infobox "Current Stats" {
  43.    files          "Number of open files\>%d",
  44.    bufnum         "This is buffer #\>%d",
  45.    "Directory\>"   cd,
  46.    "Printer\>"     QD,
  47.    justifyiswhat  "Justification\>" QD,
  48.    "Last search\>" Q2,
  49.    "_",
  50.    cpi            "Characters per inch\>%d",
  51.    indent         "Indent\>%d", 
  52.    leftmargin     "Left margin  (ruler)\>%d",
  53.    rightmargin    "Right margin (ruler)\>%d",
  54.    tabsize        "Tab size\>%d",
  55.    windows        "Windows open\>%d",
  56.    wlines         "Lines in current window\>%d",
  57.    "_",
  58.    menudelay      "Menu delay   (seconds)\>%d",
  59.    swapdelay/1000 "Backup       (seconds)\>%d",
  60.    soundfreq      "Bell         (Hertz)\>%d",
  61.    sounddur       "Bell length  (millisec.)\>%d", 
  62.    showkeys "Menu shortcuts\>%[No%:Yes%]",
  63.    killswap "Permanent swap file?\>%[Yes%:No%]"
  64.    } 
  65.  
  66.  
  67.       message "\n              Press any key to end (your screen will"
  68.                " be restored)."
  69.       key
  70.       1-> statline