home *** CD-ROM | disk | FTP | other *** search
- /* This Genie resizes the grid while keeping the same proportions.
- Written by Don Cox */
-
-
- 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
-