home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d09xx
/
d0925.lha
/
DonsGenies
/
DonsGenies.lha
/
Don'sGenies
/
GridResize.pprx
< prev
next >
Wrap
Text File
|
1993-05-25
|
921b
|
47 lines
/* This Genie resizes the grid while keeping the same proportions.
Written by Don Cox. Not Public Domain. All rights reserved. */
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
cr="0a"x
currentunits = ppm_GetUnits()
call ppm_SetUnits(2)
gsize = ppm_GetGridSize()
call ppm_SaveText("ram:gridsize",gsize)
userinput = ppm_GetUserText(7,"Type percentage of current size")
if userinput = "" then exit_msg()
Xsize = word(gsize,1)
Ysize = word(gsize,2)
userinput = userinput/100
Xsize = Xsize*userinput
Ysize = Ysize*userinput
call ppm_SetGridSize(Xsize,Ysize)
call ppm_SetUnits(currentunits)
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_ClearStatus()
call ppm_AutoUpdate(1)
exit
end