home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
f
/
finalwriter
/
finalwriterv5.03h.dms
/
finalwriterv5.03h.adf
/
FWMacros.lha
/
GfxNudge_Right
< prev
next >
Wrap
Text File
|
1993-10-25
|
2KB
|
81 lines
/* ================================================= */
/* Move the currently selected objects to the right */
/* by 45 micropoints. */
/* FinalWriter macro written by Ric Fischer - 7/9/93 */
/* $VER: GfxNudge_Right 3.0 (21.7.93) */
/* ================================================= */
Options Results
I = 0
X = 0
/* --------------------------------------- */
/* All measurement will be in micropoints. */
/* --------------------------------------- */
SetMeasure MICROPOINTS
/* ------------------------------------------- */
/* Get the id of the first selected object. */
/* If there are no objects selected then quit. */
/* ------------------------------------------- */
FirstObject SELECTED
IF ( Result = 0 ) THEN
EXIT
/* ------------------------------------------- */
/* Collect the ids of all the selected objects */
/* ------------------------------------------- */
DO WHILE Result ~= 0; I = I + 1
Objects.I = Result
NextObject Objects.I SELECTED
END
/* ------------------------------------- */
/* Loop through all of our object moving */
/* each one to the left. */
/* ------------------------------------- */
DO WHILE X < I; X = X + 1
GetObjectType Objects.X
ObjType = Result
GetObjectCoords Objects.X
Coords = Result
PARSE VAR Coords Page x1 y1 x2 y2
IF (ObjType = 2) | (ObjType = 3) THEN
IF (x1 > 12195) | (x2 > 12195) THEN
DO
IF x1 > 12195 THEN
do
x2 = x2 + (12240 - x1)
x1 = 12240
END
ELSE
IF x2 > 12195 THEN
DO
x1 = x1 + (12240 - x2)
x2 = 12240
END
END
ELSE
DO
x1 = x1 + 45
x2 = x2 + 45
END
ELSE
IF (x1 > 12195) THEN x1 = 12240; ELSE x1 = x1 + 45
SetObjectCoords Objects.X Page x1 y1 x2 y2
END
/* ------------------------------- */
/* Reselect all of our objects and */
/* redraw to show our changes. */
/* ------------------------------- */
X = 0
DO WHILE X < I; X = X + 1
SelectObject Objects.X MULTIPLE
End
Redraw