home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / bit / listserv / wpwinl / 489 < prev    next >
Encoding:
Text File  |  1992-11-18  |  2.6 KB  |  65 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!uvaarpa!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!DENISON.BITNET!REITSMAC
  3. X-Envelope-to: wpwin-l@ubvm.bitnet
  4. X-POPmail-Charset: English
  5. Message-ID: <46546.reitsmac@max.cc.denison.edu>
  6. Newsgroups: bit.listserv.wpwin-l
  7. Date:         Wed, 18 Nov 1992 12:55:39 CST
  8. Sender:       WordPerfect For Windows Discussion List <WPWIN-L@UBVM.BITNET>
  9. From:         Charlie Reitsma <REITSMAC@DENISON.BITNET>
  10. Subject:      RE: "Repeat" in WP4WIN
  11. Lines: 52
  12.  
  13. >There is no equivalent in wpwin. You shall have to write a macro to do this.
  14.  
  15. And it was posted to this list 4 months ago...here it is again.
  16. //     REPEAT.WCM                                             7/31/92
  17. //
  18. //     Created By:  Greg Burlile,  Ohio State University
  19. //     Created For:  WordPerfect  For Windows 5.1
  20. //
  21. // This is a macro to repeat text or repeat a macro a specified number of times
  22. .
  23. // Improvements to this macro are encouraged and welcome!
  24. //
  25. Application (WP;WPWP;Default;"WPWPUS.WCD")
  26. Menu(RepeatType;Digit;;;{"Repeat &Text";"Repeat &Macro"})   // Present Menu
  27. Case(RepeatType; {1;RepeatText@;2;RepeatMacro@};QuitMacro@) // Branch
  28. //
  29. //                       Repeat Macro Section
  30. //
  31. LABEL(RepeatMacro@)
  32. GetWPData(OrigDocumentNum; CurrentDocument!) // Get current document number
  33. GetWPData(MacPath; MacroPath!)               // Get Macro Directory Path
  34. FileOpenDlg()                                // Allow User to choose a macro
  35. GetWPData(NewDocumentNum; CurrentDocument!)  // Get current document number
  36. GetWPData(NewDocument; Name!)                // Get current document name
  37. IF (NewDocumentNum=OrigDocumentNum)          // If a macro was NOT chosen
  38.      GO(QuitMacro@)
  39. ENDIF
  40. Close()
  41.   // Close the opened macro
  42. GetNumber(NumRepeats; "Enter number of times to repeat"; "Repeat #")
  43. FOR(Count; 1; Count <= NumRepeats; Count + 1)
  44.      RUN(MacPath + NewDocument)      // Run the macro the specified # of times
  45. ENDFOR
  46. GO(QuitMacro@)
  47. //
  48. //                        Repeat Text Section (up to 50 characters)
  49. //
  50. LABEL(RepeatText@)
  51. GetString(TextToRepeat; LENGTH=50; "Enter text to be repeated"; "Repeat Text")
  52. GetNumber(NumRepeats; "Enter number of times to repeat"; "Repeat #")
  53. FOR(Count; 1; Count <= NumRepeats; Count + 1)      // Loop
  54.      Type(TextToRepeat)
  55. ENDFOR
  56. GO(QuitMacro@)
  57. //
  58. LABEL(QuitMacro@)
  59. QUIT
  60. --
  61. +==============+=================================================+
  62. +  T . H . E   +             Greg Burlile            Go Bucks !  +
  63. +  OHIO STATE  +                                                 +
  64. +  UNIVERSITY  +  Internet:  gburlile@magnus.acs.ohio-state.edu  +
  65.