home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1996 July
/
AMIGA_1996_7.BIN
/
patches
/
pagestream
/
3.0iupdate
/
macros.lha
/
PlaceGraphicAt.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-24
|
1KB
|
52 lines
/* $VER: PlaceGraphicAt.rexx 1.0a (03.24.95)
Copyright 1995 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)
IF ~SHOW('L','softlogik:libs/slarexxsupport.library') THEN
CALL ADDLIB('softlogik:libs/slarexxsupport.library', 0, -30)
ADDRESS 'PAGESTREAM'
/* SELECT THE GRAPHIC */
'refresh wait'
'placegraphic status'
if rc~=0 then signal cancel
/* GET THE OBJECT ID AND TYPE */
'getobject type objtype'
objnum=result
trace ?i
/* POSITION THE PICTURE */
getregion coord message '"Click or drag to place the picture."'
if rc=10 then do
'deleteobject'
signal cancel
end
if (abs(p2d(coord.x1)-p2d(coord.x2)))<0.25 | (abs(p2d(coord.y1)-p2d(coord.y2)))<0.25 then DO
if objtype=12 then getpicture position pstem
if objtype=2 then getdrawing position pstem
if objtype=13 then geteps position pstem
coord.x2=p2d(pstem.right)+p2d(coord.x1)
coord.y2=p2d(pstem.bottom)+p2d(coord.y1)
end
if objtype=12 then editpicture position coord.x1 coord.y1 coord.x2 coord.y2
if objtype=2 then editdrawing position coord.x1 coord.y1 coord.x2 coord.y2
if objtype=13 then editeps position coord.x1 coord.y1 coord.x2 coord.y2
'refresh continue'
EXIT
CANCEL:
'refresh continue'
EXIT