home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
f
/
finalwriter
/
finalwriterv5.04ukver.lha
/
FinalWriter_B
/
FWMacros
/
GfxNudge_Left
< prev
next >
Wrap
Text File
|
1993-10-25
|
2KB
|
81 lines
/* ================================================= */
/* Move the currently selected objects to the left */
/* by 45 micropoints. */
/* FinalWriter macro written by Ric Fischer - 7/9/93 */
/* $VER: GfxNudge_Left 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 < 46) | (x2 < 46) THEN
DO
IF x1 < 46 THEN
DO
x2 = x2 - x1
x1 = 0
END
ELSE
IF x2 < 46 THEN
DO
x1 = x1 - x2
x2 = 0
END
END
ELSE
DO
x1 = x1 - 45
x2 = x2 - 45
END
ELSE
IF (x1 < 46) THEN x1 = 0; 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