home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d925 / donsgenies.lha / DonsGenies / FrenchGenies.lha / Rexx / CopierBoitePagesReli馥s.pprx < prev    next >
Text File  |  1993-08-03  |  2KB  |  94 lines

  1. /*
  2. @BCopierBoitePagesReliées @P @I © Gold Disk Inc. Février 1992
  3. Modifié par Don Cox.
  4. Traduit par Fabien Larini le 23/07/93.
  5.  
  6. Ce Génie est identique à CopierBoiteDansPages sauf que les boîtes sont
  7. reliées.
  8. */
  9.  
  10.  
  11. /*
  12. @BCopyBoxToPagesLinked  @P@ICopyright Gold Disk Inc. February, 1992
  13.  
  14. This Genie will copy a box and its contents to a range of pages.
  15. */
  16. address command
  17. call SafeEndEdit.rexx()
  18. call ppm_AutoUpdate(0)
  19. arg box, startpage, endpage
  20. pageoptions = "GCHESDRTESTOUTES "
  21.  
  22. if box = '' then
  23. do
  24.     box =  ppm_ClickOnBox("Clickez dans la Boîte à copier")
  25.     if box = 0 then exit_msg()
  26.     docstart = ppm_DocFirstPage()
  27.     docend = ppm_DocLastPage()
  28.  
  29.     form = "De la Page:"docstart'0a'x "A la Page:"docend'0a'x "GCHES/DRTES/TOUTES"
  30.     form = upper(ppm_GetForm("Sélection des options", 8, form))
  31.         if form = '' then exit_msg()
  32.  
  33.     parse var form startpage '0a'x endpage '0a'x pageopts
  34.  
  35.     if endpage = '' then exit_msg('Intervalle Incorrect')
  36.     if pageopts = '' then pageopts = 'TOUTES'
  37.  
  38.     if startpage < docstart then exit_msg('Intervalle Incorrect')
  39.     else if startpage > docend then exit_msg('Intervalle Incorrect')
  40.     if endpage < docstart then exit_msg('Intervalle Incorrect')
  41.     else if endpage > docend then exit_msg('Intervalle Incorrect')
  42.     if endpage < startpage then exit_msg('Intervalle Incorrect')
  43. end
  44.  
  45. if upper(word(ppm_GetBoxInfo(box), 1)) = "TEXTE" & ppm_TextOverFlow(box) then
  46.     text = ppm_GetArticleText(box,1)
  47. else
  48.     text = ''
  49.  
  50. if datatype(startpage) ~= 'NUM' | datatype(endpage) ~= 'NUM' then
  51.     call exit_msg("Saisie Incorrecte")
  52.  
  53. if verify(pageopts, pageoptions) ~= 0 then exit_msg("Sasie Incorrecte")
  54.  
  55. opos = pos(pageopts, pageoptions)
  56.  
  57. if opos = 1 then
  58. do
  59.     increment = 2
  60.     if (startpage // 2) then startpage = startpage + 1
  61. end
  62. else if opos = 6 then
  63. do
  64.     increment = 2
  65.     if ~(startpage // 2) then startpage = startpage + 1
  66. end
  67. else increment = 1
  68.  
  69. do page = startpage to endpage by increment
  70.  
  71.     call ppm_ShowStatus("Travail en cours sur la page "page)
  72.     newbox  = ppm_CloneBox(box, 0, 0)
  73.     call ppm_BoxChangePage(newbox, page)
  74.     linked = ppm_LinkBox(box,newbox)
  75.     box = newbox
  76.  
  77. end
  78.  
  79. exit_msg()
  80.  
  81. exit_msg: procedure
  82. do
  83.     parse arg message
  84.  
  85.     if message ~= '' then
  86.         call ppm_Inform(1,message,)
  87.  
  88.     call ppm_ClearStatus()
  89.     call ppm_AutoUpdate(1)
  90.     exit
  91. end
  92.  
  93.  
  94.