home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d09xx
/
d0925.lha
/
DonsGenies
/
DonsGenies.lha
/
Don'sGenies
/
BoxesWOB.pprx
< prev
next >
Wrap
Text File
|
1993-05-25
|
2KB
|
80 lines
/* This Genie sets the box to black and text to white and puts an equal margin all round the box.
Written by Don Cox April '93 Not Public Domain. All rights reserved. */
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
cr="0a"x
call ppm_AutoUpdate(0)
CurrentUnits = ppm_GetUnits()
oldcolor = ppm_GetTextColor()
select
when CurrentUnits = 1 then units="inches"
when CurrentUnits = 2 then units="millimetres"
otherwise units ="points"
end
counter=0
do forever
box=ppm_ClickOnBox("Click on boxes to be changed")
if box=0 then break
counter=counter+1
boxes.counter=box
call ppm_SelectBox(box)
end
if counter=0 then exit_msg()
color = "Black"
tcolor = "White"
size = ppm_GetUserText(6,"Margin in "units)
if size = "" then exit_msg("Aborted by User")
if CurrentUnits = 2 then size = size/10 /* mm to cm */
else if CurrentUnits = 3 then size = size/12 /* points to picas */
do i=1 to counter
box=boxes.i
call ppm_SetBoxMargins(box,size,size,size,size)
call ppm_SetBoxFrameData(box,color, color, ppm_GetLineWeight(), ppm_GetLinePattern(), 1)
call ppm_SetBoxFrame(box, 1)
call ppm_SetBoxTransparent(box, 0)
if upper(word(ppm_GetBoxInfo(box), 1)) ~= TEXT then iterate i
call SafeSetEdit.rexx(box)
call ppm_SelectBoxText()
call ppm_SetTextColor(tcolor)
call SafeEndEdit.rexx()
end
call exit_msg()
end
error:
syntax:
do
exit_msg("Genie failed due to error: "errortext(rc))
end
exit_msg:
do
parse arg message
if message ~= "" then
call ppm_Inform(1,message)
call ppm_SetTextColor(oldcolor)
call ppm_SetWireFrame(0)
call ppm_ClearStatus()
call ppm_AutoUpdate(1)
exit
end