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

  1. /*
  2. @BMargesIdentiques @P @I Ecrit et © par Don Cox en Juillet 1992
  3. @IN'est pas du Domaine Publique. Tous Droits Réservés.
  4. Traduit par Fabien Larini le 24/07/93.
  5.  
  6. Ce Génie égalise les marges de la (des) boîte(s) choisie(s).
  7. */
  8.  
  9. /*MarginsAllAround*/
  10. /* This Genie puts an equal margin all round a box.
  11. Written by Don Cox  July '92  */
  12.  
  13.  
  14. signal on error
  15. signal on syntax
  16. address command
  17. call SafeEndEdit.rexx()
  18. cr="0a"x
  19.  
  20. CurrentUnits = ppm_GetUnits()
  21.  
  22. select
  23.     when CurrentUnits = 1 then units="inches"
  24.     when CurrentUnits = 2 then units="millimètres"
  25.     otherwise units ="points"
  26.     end
  27.  
  28. counter=0
  29.  
  30. do forever
  31.     box=ppm_ClickOnBox("Clickez dans les Boîtes Concernées")
  32.     if box=0 then break
  33.     counter=counter+1
  34.     boxes.counter=box
  35.     call ppm_SelectBox(box)
  36. end
  37.  
  38. if counter=0 then exit_msg()
  39.  
  40. size = ppm_GetUserText(6,"Marges en "units)
  41. if size = "" then exit_msg("Annulé par l'Utilisateur")
  42. if CurrentUnits = 2 then size = size/10  /* mm to cm */
  43. else if CurrentUnits = 3 then size = size/12  /* points to picas */
  44.  
  45. do i=1 to counter
  46.     box=boxes.i
  47.     call ppm_SetBoxMargins(box,size,size,size,size)
  48.  
  49.     end
  50.  
  51. call exit_msg()
  52.  
  53. end
  54.  
  55. error:
  56. syntax:
  57.     do
  58.     exit_msg("Arrêt du Génie dû à l'erreur: "errortext(rc))
  59.     end
  60.  
  61. exit_msg:
  62.     do
  63.     parse arg message
  64.     if message ~= "" then
  65.     call ppm_Inform(1,message,)
  66.     call ppm_ClearStatus()
  67.     call ppm_AutoUpdate(1)
  68.     exit
  69.     end
  70.  
  71.