home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!uvaarpa!darwin.sura.net!paladin.american.edu!auvm!LEHIGH.EDU!JAHB
- Message-ID: <199301272325.AA55222@ns2.CC.Lehigh.EDU>
- Newsgroups: bit.listserv.toolb-l
- Date: Wed, 27 Jan 1993 18:25:46 EST
- Sender: Asymetrix 'Toolbook' product discussions <TOOLB-L@UAFSYSB.BITNET>
- From: "JENNIFER A. HEISE" <jahb@LEHIGH.EDU>
- Subject: Re: global change script
- Lines: 48
-
- Thanks to Bert Wolf for his global change script.
- I've figured out a way to take statistics for all uses of each page in a
- Toolbook Book, if anyone is interested (if anyone can improve on it, let me
- know-- it is combersome).
-
- Create a field "counter" on each page (a simple go to each page script will do
- this) with the text "0".
- At the book level, insert the script:
- to handle leavePage
- get text of field counter
- increment it
- put it into text of field counter
- end leavePage
-
- You also have to add the line
- send save
- to the LeaveBook handler at the Book level.
-
- To collect the statistics, I have a cut&paste button &field combination
- (fieldname Statistics). Script of the button:
- to handle buttonUp
- set sysSuspend Messages
- put 1 into PageVar
- put PageCount of this book into EndPage
- while not (PageVar = (EndPage+1))
- put name of page PageVar after text of field "Statistics"
- put "," after text of field "Statistics"
- put text of field counter of page PageVar after text of field
- "Statistics"
- Put CR after text of field "Statistics"
- put 0 into text of field counter of page PageVar
- increment PageVar
- end while
- end buttonUp
-
- While sloppy, this works very well. Only one problem: CR doesn't produce a
- carriage return in the text-- and if I use Clipboard to move the text to text
- editor, it deletes the first character following each CR.
- Is there any way to get around this?
-
-
- Jennifer Heise Net: jahb@lehigh.edu
- Reference Dept., Phone: (215) 758-3072
- Fairchild-Martindale Libraries #8A, Lehigh University, Bethlehem, PA 18015
- My opinions are my own. No one else would HAVE them anyway.
-
- "The toad beneath the harrow knows Exactly where each tooth-point goes;
- The butterfly upon the road Preaches contentment to that toad." Kipling
-