home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1996 July
/
AMIGA_1996_7.BIN
/
patches
/
pagestream
/
3.0iupdate
/
macros.lha
/
ReplaceGraphic.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-09-20
|
3KB
|
59 lines
/* $VER: ReplaceGraphic.rexx 1.0 (02.9.94)
Copyright 1994 Soft-Logik Publishing Corporation
May not be distributed without Soft-Logik Publishing Corporation's express written permission */
OPTIONS RESULTS
TRACE OFF
/* Make sure rexx support is opened */
IF ~SHOW('L','rexxsupport.library') THEN
CALL ADDLIB('rexxsupport.library',0,-30)
ADDRESS 'PAGESTREAM'
/* Check and see if a box or graphic is selected */
'getobject type objtype'
objnum=result
/* object types: 12:picture, 5:box, 2:drawing, 13:eps */
if objtype=12 | objtype=5 | objtype=2 | objtype=13 then do
'refresh wait'
if objtype=12 then getpicture position pstem rotation rstem about rstem contentoffset cstem contentscale cstem frame fflag constrain cflag print pflag
if objtype=5 then getbox position pstem rotation rstem about rstem constrain cflag print pflag
if objtype=2 then getdrawing position pstem rotation rstem about rstem contentoffset cstem contentscale cstem frame fflag constrain cflag print pflag
if objtype=13 then geteps position pstem rotation rstem about rstem contentoffset cstem contentscale cstem frame fflag constrain cflag print pflag
gettextwrap region wmode wrap wtype standoff wstem objectid objnum
placegraphic status
if rc~=0 then signal cancel
'getobject type nobjtype'
nobjnum=result
pstring=position' 'pstem.left' 'pstem.top' 'pstem.right' 'pstem.bottom' skew 'rstem.slant' 'rstem.twist
if fflag=ON then pstring=pstring' framed contentoffset 'cstem.x' 'cstem.y' contentscale 'cstem.h' 'cstem.v
if rstem.mode=POINT then pstring=pstring' about 'rstem.x' 'rstem.y
if cflag=ON then pstring=pstring' constrain'
if pflag=OFF then pstring=pstring' noprint'
if nobjtype=12 then 'editpicture 'pstring
if nobjtype=2 then 'editdrawing 'pstring
if nobjtype=13 then 'editeps 'pstring
if wtype~=NOWRAP then settextwrap wmode wtype standoff wstem.x wstem.y
deleteobject objectid objnum
selectobject objectid nobjnum
'refresh continue'
end
else do
allocarexxrequester '"Replace Graphic Error!"' 540 61
reqhandle=result
addarexxgadget reqhandle EXIT 235 44 70 label "_Exit"
Exithandle=result
addarexxgadget reqhandle TEXT 8 10 520 border none string "'A box or graphic must be selected to replace with a new graphic.'"
addarexxgadget reqhandle TEXT 8 22 520 border none string "'Select one box or graphic and choose Replace Graphic again.'"
doarexxrequester reqhandle
freearexxrequester reqhandle
EXIT
end
EXIT
CANCEL:
selectobject objectid objnum
'refresh continue'
EXIT