![]() Purple, unbolded items are class properties (this script contains none).Black bolded items are AppleScript keywords.Blue bolded items are commands particular to OmniGraffle.This post assumes that you have some familiarity with programming concepts such as variables, loops, classes, etc., but does not assume knowledge of AppleScript in particular. Here is the Applescript code, and below I'll call out various lines to explain them. For instance, you might want to change all canvases in your document to a different size, so knowing how to walk through all canvases in a document is a good starting point. While you may have no need for this particular functionality, the code below shows a general technique for accessing each canvas, each layer within a canvas, and each object on a layer. The following example shows you how to reposition all objects in your document by a certain horizontal/vertical offset - in this case, 20 pixels up, and 20 pixels to the left. To execute AppleScript, open the AppleScript editor, create a script in it, and run it. Omnigraffle gives quite a bit of access to AppleScript for automating just about anything you can do by hand. Update (): a new version of this script that prompts for the horizontal and vertical offsets (rather than having to edit the script) appears after the jump. Preview will automatically set the zoom to fit the paper size you select in its print dialog, All resulting pages in the PDF will be sized to your canvas size (assuming you followed step 1 above). Note: do NOT print to PDF, but instead go to File > Export and chose PDF document. If you plan to print and want the printer to ignore the page size set in Page Setup, export to a PDF document first.Pick or create a humungous paper size in Page Setup, just to be safe. ![]()
0 Comments
Leave a Reply. |