home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / bit / listserv / toolbl / 28 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.3 KB  |  59 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!uvaarpa!darwin.sura.net!paladin.american.edu!auvm!LEHIGH.EDU!JAHB
  3. Message-ID: <199301272325.AA55222@ns2.CC.Lehigh.EDU>
  4. Newsgroups: bit.listserv.toolb-l
  5. Date:         Wed, 27 Jan 1993 18:25:46 EST
  6. Sender:       Asymetrix 'Toolbook' product discussions <TOOLB-L@UAFSYSB.BITNET>
  7. From:         "JENNIFER A. HEISE" <jahb@LEHIGH.EDU>
  8. Subject:      Re: global change script
  9. Lines: 48
  10.  
  11. Thanks to Bert Wolf for his global change script.
  12. I've figured out a way to take statistics for all uses of each page in a
  13. Toolbook Book, if anyone is interested (if anyone can improve on it, let me
  14. know-- it is combersome).
  15.  
  16. Create a field "counter" on each page (a simple go to each page script will do
  17. this) with the text "0".
  18. At the book level, insert the script:
  19.     to handle leavePage
  20.         get text of field counter
  21.         increment it
  22.         put it into text of field counter
  23.     end leavePage
  24.  
  25.     You also have to add the line
  26.     send save
  27.     to the LeaveBook handler at the Book level.
  28.  
  29. To collect the statistics, I have a cut&paste button &field combination
  30. (fieldname Statistics). Script of the button:
  31.     to handle buttonUp
  32.         set sysSuspend Messages
  33.         put 1 into PageVar
  34.         put PageCount of this book into EndPage
  35.         while not (PageVar = (EndPage+1))
  36.             put name of page PageVar after text of field "Statistics"
  37.             put "," after text of field "Statistics"
  38.             put text of field counter of page PageVar after text of field
  39.             "Statistics"
  40.             Put CR after text of field "Statistics"
  41.             put 0 into text of field counter of page PageVar
  42.             increment PageVar
  43.         end while
  44.     end buttonUp
  45.  
  46. While sloppy, this works very well. Only one problem: CR doesn't produce a
  47. carriage return in the text-- and if I use Clipboard to move the text to text
  48. editor, it deletes the first character following each CR.
  49. Is there any way to get around this?
  50.  
  51.  
  52.     Jennifer Heise                           Net: jahb@lehigh.edu
  53. Reference Dept.,                         Phone: (215) 758-3072
  54. Fairchild-Martindale Libraries #8A,  Lehigh University, Bethlehem, PA 18015
  55. My opinions are my own. No one else would HAVE them anyway.
  56.  
  57. "The toad beneath the harrow knows Exactly where each tooth-point goes;
  58. The butterfly upon the road Preaches contentment to that toad."  Kipling
  59.