home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d09xx
/
d0925.lha
/
DonsGenies
/
DonsGenies.lha
/
Don'sGenies
/
LandscapePage.pprx
< prev
next >
Wrap
Text File
|
1993-05-25
|
1KB
|
57 lines
/* This Genie changes a portrait format page to landscape, and vice versa. It sets up the Postscript output specs correctly.
Written by Don Cox July '92 Not Public Domain. All rights reserved. */
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
cpage = ppm_CurrentPage()
psize = ppm_GetPageSize(cpage)
Xsize = word(psize,1)
Ysize = word(psize,2)
if Xsize = Ysize then exit_msg("Page is square")
if Xsize<Ysize then
do
shape = "Portrait"
newshape = "Landscape"
neworient = 2
end
else do
shape = "Landscape"
newshape = "Portrait"
neworient = 1
end
choiceint = ppm_Inform(2,"Page is currently "shape". Convert to "newshape"?","Yes","No")
if choiceint ~=0 then exit_msg("No change")
call ppm_SetPageSize(cpage,Ysize,Xsize)
orient = ppm_GetPSOutputOrient(cpage)
call ppm_SetPSOutputOrient(cpage,neworient)
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,"Resume")
call ppm_ClearStatus()
call ppm_AutoUpdate(1)
exit
end