home *** CD-ROM | disk | FTP | other *** search
- /*
- @BCopyPages @P@ICopyright Gold Disk Inc., February, 1992
- Make any number of copies of a range of pages.
- */
- cr = '0a'x
- call SafeEndEdit.rexx()
- last = ppm_DocLastPage()
- first = ppm_DocFirstPage()
- cpage = ppm_CurrentPage()
- if cpage = 0 then exit_msg("Please create a page before running this Genie.")
-
- form = "From:"first'0a'x"To:"last'0a'x"Num copies:"1
- form = ppm_GetForm("Enter Range Of Pages", 5, form)
- if form = '' then call exit_msg()
- parse var form from '0a'x topage '0a'x numcopies
-
- if ~(datatype(from, n) & datatype(topage, n) & datatype(numcopies, n)) then
- exit_msg('Invalid Input')
-
- if from < first | from > last | topage < first | topage > last then
- exit_msg('Invalid Input')
-
- call ppm_AutoUpdate(0)
-
- endpage = topage + 1
-
- do n = 1 to numcopies
- do i = from to topage
- call ppm_CopyPage(i, endpage, 1)
- endpage = endpage + 1
- end
- end
-
- exit_msg("Done")
-
- exit_msg: procedure expose cpage
- do
- parse arg message
-
- if message ~= '' then call ppm_Inform(1, message,)
- call ppm_GotoPage(cpage)
- call ppm_AutoUpdate(1)
- exit
- end
-
-