home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!uvaarpa!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!DENISON.BITNET!REITSMAC
- X-Envelope-to: wpwin-l@ubvm.bitnet
- X-POPmail-Charset: English
- Message-ID: <46546.reitsmac@max.cc.denison.edu>
- Newsgroups: bit.listserv.wpwin-l
- Date: Wed, 18 Nov 1992 12:55:39 CST
- Sender: WordPerfect For Windows Discussion List <WPWIN-L@UBVM.BITNET>
- From: Charlie Reitsma <REITSMAC@DENISON.BITNET>
- Subject: RE: "Repeat" in WP4WIN
- Lines: 52
-
- >There is no equivalent in wpwin. You shall have to write a macro to do this.
-
- And it was posted to this list 4 months ago...here it is again.
- // REPEAT.WCM 7/31/92
- //
- // Created By: Greg Burlile, Ohio State University
- // Created For: WordPerfect For Windows 5.1
- //
- // This is a macro to repeat text or repeat a macro a specified number of times
- .
- // Improvements to this macro are encouraged and welcome!
- //
- Application (WP;WPWP;Default;"WPWPUS.WCD")
- Menu(RepeatType;Digit;;;{"Repeat &Text";"Repeat &Macro"}) // Present Menu
- Case(RepeatType; {1;RepeatText@;2;RepeatMacro@};QuitMacro@) // Branch
- //
- // Repeat Macro Section
- //
- LABEL(RepeatMacro@)
- GetWPData(OrigDocumentNum; CurrentDocument!) // Get current document number
- GetWPData(MacPath; MacroPath!) // Get Macro Directory Path
- FileOpenDlg() // Allow User to choose a macro
- GetWPData(NewDocumentNum; CurrentDocument!) // Get current document number
- GetWPData(NewDocument; Name!) // Get current document name
- IF (NewDocumentNum=OrigDocumentNum) // If a macro was NOT chosen
- GO(QuitMacro@)
- ENDIF
- Close()
- // Close the opened macro
- GetNumber(NumRepeats; "Enter number of times to repeat"; "Repeat #")
- FOR(Count; 1; Count <= NumRepeats; Count + 1)
- RUN(MacPath + NewDocument) // Run the macro the specified # of times
- ENDFOR
- GO(QuitMacro@)
- //
- // Repeat Text Section (up to 50 characters)
- //
- LABEL(RepeatText@)
- GetString(TextToRepeat; LENGTH=50; "Enter text to be repeated"; "Repeat Text")
- GetNumber(NumRepeats; "Enter number of times to repeat"; "Repeat #")
- FOR(Count; 1; Count <= NumRepeats; Count + 1) // Loop
- Type(TextToRepeat)
- ENDFOR
- GO(QuitMacro@)
- //
- LABEL(QuitMacro@)
- QUIT
- --
- +==============+=================================================+
- + T . H . E + Greg Burlile Go Bucks ! +
- + OHIO STATE + +
- + UNIVERSITY + Internet: gburlile@magnus.acs.ohio-state.edu +
-