home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d09xx
/
d0925.lha
/
DonsGenies
/
FrenchGenies.lha
/
Rexx
/
CopierEtRépéterRelié.pprx
< prev
next >
Wrap
Text File
|
1993-08-03
|
3KB
|
102 lines
/*
@BCopierEtRΘpΘterReliΘ @P@ICopyright Gold Disk Inc., FΘvrier 1992
ModifiΘ par Don Cox.
Ce Genie permet de crΘer plusieurs copies d'une mΩme boεte en spΘcifiant la distance et l'angle entre ces diffΘrentes copies. Les boεtes sont reliΘes.
*/
cr = '0a'x
address command
call SafeEndEdit.rexx()
units = ppm_GetUnits()
if units = 3 then
call ppm_SetUnits(1)
signal on halt
signal on break_c
signal on break_e
signal on break_d
form = "Colonnes"cr"RangΘes"cr"GouttiΦre"
/* This Genie allows user to duplicate, move and rotate a box
* in one step
*/
box = ppm_ClickOnBox("Cliquez sur la boεte α copier...")
if box = 0 then exit_msg()
dup = 0
boxpos = ppm_GetBoxPosition(box)
cur_x = word(boxpos, 1 )
cur_y = word(boxpos, 2 )
boxsize = ppm_GetBoxSize(box)
width = word(boxsize, 1 )
height = word(boxsize, 2 )
if units = 3 then
do
call ppm_ShowStatus("Position: " || ppm_ConvertUnits(1, 3, cur_x) || ", " || ppm_ConvertUnits(1, 3, cur_y) || " taille: l" || ppm_ConvertUnits(1, 3, width) || ", h" || ppm_ConvertUnits(1, 3, height))
form = "Nombre de copies:1"cr"Distance horizontale:" || ppm_ConvertUnits(1, 3, width)||cr"Distance verticale:" || ppm_ConvertUnits(1, 3, height)||cr"Angle"
end
else
do
call ppm_ShowStatus("Position: "cur_x", "cur_y" taille: l"width", h"height)
form ="Nombre de copies:1"cr"Distance horizontale:"width||cr"Distance verticale:"height||cr"Angle"
end
form = ppm_GetForm("SΘlection des options", 8, form)
if form = '' then exit_msg()
parse var form count '0a'x horizontal '0a'x vertical '0a'x angle
if count = '' then count = 1
if horizontal = '' then horizontal = 0
if vertical = '' then vertical = 0
if angle = '' then angle = 0
if ~(datatype(count, n) & datatype(horizontal, n) & datatype(vertical, n) & datatype(angle, n)) then exit_msg("Saisie incorrecte")
if units = 3 then
do
horizontal = ppm_ConvertUnits(3, 1, horizontal)
vertical = ppm_ConvertUnits(3, 1, vertical)
end
call ppm_AutoUpdate(0)
rotationangle = angle
do i = 1 to count
newbox = ppm_CloneBox(box, horizontal, vertical)
linked = ppm_LinkBox(box,newbox)
if angle ~= 0 then
do
call ppm_SetBoxAngle(newbox, rotationangle)
rotationangle = rotationangle + angle
end
box = newbox
end
exit_msg()
break_d:
break_e:
break_c:
halt:
call exit_msg("Abandon du Genie par l'utilisateur !")
exit_msg: procedure expose units
do
parse arg message
if message ~= '' then call ppm_Inform(1, message,)
call ppm_ClearStatus()
if units = 3 then call ppm_SetUnits(3)
call ppm_AutoUpdate(1)
exit
end