@BRemplaceBoεtesSurPages @P @I Ecrit par et ⌐ Don Cox en mai 1992
@IN'est pas du Domaine Publique. Tous Droits RΘservΘs.
Traduit par Fabien Larini le 24/07/93.
Ce GΘnie remplace toute les boεtes α une position donnΘe sur un ensemble
de pages. Il vous demande de sΘlectionner la boεte qui dΘtermine
la position des boεtes α Θchanger et qui sera copiΘe α la place de celles
qui auront le mΩme emplacement au niveau du coin supΘrieur gauche.
Le contenu des boεtes qui sont remplacΘes est perdu.
*/
/*
ReplaceBoxesOnPages
This Genie will replace each box at a particular position on a range of pages. You will be prompted to select the box which occurs at a position on the range of pages.
The box you click on will replace all boxes in the page range which are in exactly the same position, as defined by the top left corner.
Written by Don Cox May '92
*/
cr = '0a'x
pageopts = "GCHESDRTESTOUTES"
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
counter = 0
signal on error
signal on syntax
boxpos = ppm_GetClickPosition("Clickez dans la Boεte α Copier sur chaque Pages")
originalpage = ppm_CurrentPage()
boxtop = word(boxpos, 2)
boxleft = word(boxpos, 1)
box = ppm_BoxAtPosn(boxleft, boxtop)
if box = 0 then exit_msg()
if upper(word(ppm_GetBoxInfo(box), 1)) = "TEXTE" & ppm_TextOverFlow(box) then
text = ppm_GetArticleText(box,1)
else
text = ''
docstart = ppm_DocFirstPage()
docend = ppm_DocLastPage()
pages = upper(ppm_GetForm("Sur quelles Pages ?", 20, "De la Page :"docstart'0a'x "A la Page :"docend'0a'x "GCHES/DRTES/TOUTES"))
if pages = '' then exit_msg()
parse var pages startpage '0a'x endpage '0a'x pageopt
if (startpage ~= '' & datatype(startpage) ~= NUM) | (endpage ~= '' & datatype(endpage) ~= NUM ) then exit_msg("DonnΘes Invalides")
increment = 1
/*
* Check error conditions
*/
if startpage < docstart then exit_msg('Intervale Incorrect')
else if startpage > docend then exit_msg('Intervale Incorrect')
if endpage < docstart then exit_msg('Intervale Incorrect')
else if endpage > docend then exit_msg('Intervale Incorrect')
if endpage < startpage then exit_msg('Intervale Incorrect')
if (pageopt = 'TOUTES' | pageopt = 'T' | pageopts = "") then
do
increment = 1
end
else if pageopt = 'GCHES' | pageopt = 'G' then
do
increment = 2
if (startpage // 2) then startpage = startpage + 1
end
else if pageopt = 'DRTES' | pageopt = 'D' then
do
increment = 2
if ~(startpage // 2) then startpage = startpage + 1
end
if startpage > endpage then
do
temp = startpage
startpage = endpage
endpage = temp
end
do page = startpage to endpage by increment
if page ~= originalpage then do
call ppm_ShowStatus("Travail en cours sur la Page "page)