home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0925.lha / DonsGenies / FrenchGenies.lha / Rexx / GrilleTiréeDeLaBoîte.pprx < prev    next >
Text File  |  1993-08-03  |  2KB  |  66 lines

  1. /*
  2. @BGrilleTirΘeDeLaBoεte @P @I Ecrit et ⌐ par Don Cox en Ao√t 1992
  3. @IRΘvision en FΘvrier 1993. N'est pas du Domaine Publique. Tous Droits
  4. @IRΘservΘs.
  5. Traduit par Fabien Larini le 23/07/93.
  6.  
  7. Ce GΘnie utilise les dimensions d'une boεte choisie pour les placer dans
  8. la grille. Active l'alignement sur la grille. Sauve les dimensions de 
  9. l'ancienne grille pour pouvoir les rappeler avec le GΘnie "RestoreGrille".
  10. */
  11.  
  12.  
  13. /*GridFromBox*/
  14. /* This Genie sets up a grid to match a box, with snap enabled. Written
  15. by Don Cox  ⌐ August 92*/
  16.  
  17.  
  18. signal on error
  19. signal on syntax
  20. address command
  21. call SafeEndEdit.rexx()
  22. call ppm_AutoUpdate(0)
  23. cr="0a"x
  24.  
  25. currentunits = ppm_GetUnits()
  26. box     = ppm_ClickOnBox("Clickez dans la Boεte pour les Dimensions de la Grille.")
  27. if box  = 0 then exit_msg("Pas de Boεte SΘlectionnΘe")
  28. gsize = ppm_GetGridSize()
  29. gwidth = word(gsize,1)
  30. gheight = word(gsize,2)                      
  31. call ppm_SaveText("ram:gridsize",gsize)
  32. size = ppm_GetBoxSize(box)
  33. width = word(size,1)
  34. height = word(size,2)
  35. choice = ppm_Inform(3,"Quelle(s) dimension(s) de la Boεte ?","Largeur","Hauteur","Les Deux")
  36. select
  37.     when choice = 0 then call ppm_SetGridSize(width,gheight)
  38.     when choice = 1 then call ppm_SetGridSize(gwidth,height)
  39.     otherwise call ppm_SetGridSize(width,height)
  40.     end
  41.  
  42.  
  43. call ppm_SetGrid(1)
  44.  
  45. call ppm_SetGridSnap(1)
  46.  
  47. call exit_msg()
  48.  
  49. end
  50.  
  51. error:
  52. syntax:
  53.     do
  54.     exit_msg("ArrΩt du GΘnie d√ α l'erreur: "errortext(rc))
  55.     end
  56.  
  57. exit_msg:
  58.     do
  59.     parse arg message
  60.     if message ~= "" then
  61.     call ppm_Inform(1,message,)
  62.     call ppm_ClearStatus()
  63.     call ppm_AutoUpdate(1)
  64.     exit
  65.     end
  66.