/* Add Crop Marks v1.0, for Wordworth v5 by Ryan Morse © 1996. $VER: Add_Crop_Marks_Macro v1.0 (26/02/96) This macro is part of the PrintPlus (© Ryan Morse) Wordworth ARexx enhancement set. INSTRUCTIONS: This Wizard will add crop/trim marks to your document. NOTE: Wordworth will not allow you to add grouped objects to all pages. For this reason I have included two buttons; the first will draw and group the trim marks on the specified page, and the second will draw and add the trim marks to all pages. */ /* Return results */ OPTIONS RESULTS /* Notify user */ WIZARDREQ TITLE 'Add Crop Marks, by Ryan Morse © 1996.' LABEL 'This Wizard will add crop marks to your document.' LABEL 'If you want to add crop marks to an object or group, you can' LABEL 'leave its Information requester open and copy its' LABEL 'co-ordinates into this requester.' LABEL '' LABEL 'Enter the details for the crop marks in Centimetres:' TEXTBOX 1 '_Page:' CONTENTS '1' TEXTBOX 2 'From _Left:' TEXTBOX 3 'From _Top:' TEXTBOX 4 '_Width:' TEXTBOX 5 '_Height:' BUTTON 1 '_Single Page' BUTTON 2 '_All Pages' BUTTON '-1' '_Cancel' /* BUTTONS */ /* Create variable for button result */ ButtonResult = RESULT /* If user cancels requester then stop macro */ IF ButtonResult = -1 THEN DO REQUESTNOTIFY 'AREXX MACRO CANCELLED.' EXIT END /* GET VALUES */ /* Get page */ WIZARD_GETTEXTBOX 1 Page = RESULT /* Get From Left (X co-ordinate) */ WIZARD_GETTEXTBOX 2 X = RESULT /* Get From Top (Y co-ordinate) */ WIZARD_GETTEXTBOX 3 Y = RESULT /* Get width */ WIZARD_GETTEXTBOX 4 Width = RESULT /* Get height */ WIZARD_GETTEXTBOX 5 Height = RESULT /* GET CO-ORDINATES */ /* Get left co-ordinates */ Left1 = X - 1.0 Left2 = X - 0.2 /* Get right co-ordinates */ Right1 = (X + Width) Right2 = (X + Width) + 0.2 Right3 = (X + Width) + 1.0 /* Get top co-ordinates */ Top1 = Y - 1.0 Top2 = Y - 0.2 /* Get bottom co-ordinates */ Bottom1 = (Y + Height) Bottom2 = (Y + Height) + 0.2 Bottom3 = (Y + Height) + 1.0 /* DRAW CROP MARKS */ /* Top left horizontal */ DRAWLINE Page Left1 || 'cm' Y || 'cm' Left2 || 'cm' Y || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.1 = RESULT /* Top left vertical */ DRAWLINE Page X || 'cm' Top1 || 'cm' X || 'cm' Top2 || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.2 = RESULT /* Top right horizontal */ DRAWLINE Page Right2 || 'cm' Y || 'cm' Right3 || 'cm' Y || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.3 = RESULT /* Top right vertical */ DRAWLINE Page Right1 || 'cm' Top1 || 'cm' Right1 || 'cm' Top2 || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.4 = RESULT /* Bottom left horizontal */ DRAWLINE Page Left1 || 'cm' Bottom1 || 'cm' Left2 || 'cm' Bottom1 || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.5 = RESULT /* Bottom left vertical */ DRAWLINE Page X || 'cm' Bottom2 || 'cm' X || 'cm' Bottom3 || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.6 = RESULT /* Bottom right horizontal */ DRAWLINE Page Right2 || 'cm' Bottom1 || 'cm' Right3 || 'cm' Bottom1 || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.7 = RESULT /* Bottom right vertical */ DRAWLINE Page Right1 || 'cm' Bottom2 || 'cm' Right1 || 'cm' Bottom3 || 'cm' 0.1 BLACK PLAIN NORMAL NORMAL NONE Line.8 = RESULT /* SELECT CROP MARKS */ /* Select trim marks */ SELECTOBJECT Line.1 DO Number=2 TO 8 BY 1 SELECTOBJECT Line.Number MULTISELECT END /* BUTTON 1 - Draw */ IF ButtonResult = 1 THEN DO /* Group trim marks */ GROUP /* End loop for Draw button */ END /* BUTTON 2 - All Pages */ IF ButtonResult = 2 THEN DO /* Add trim marks to all pages */ ADDTOALLPAGES /* End loop for All Pages button */ END /* LOCK CROP MARKS */ LOCK