home *** CD-ROM | disk | FTP | other *** search
- /*
- @N
-
- This Genie makes any number of copies of a range of pages.
- */
- cr = '0a'x
- last = pdm_DocLastPage()
- first = pdm_DocFirstPage()
- cpage = pdm_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 = pdm_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 pdm_AutoUpdate(0)
-
- endpage = topage + 1
-
- do n = 1 to numcopies
- do i = from to topage
- call pdm_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 pdm_Inform(1, message,)
- if cpage ~= 0 then call pdm_GotoPage(cpage)
- call pdm_AutoUpdate(1)
- exit
- end
-
-