Quickies

[categories] [index] [all (527)] [latest]

OmniGraffle
  1. In the Edit menu, you can copy any object as AppleScript.

    You can then edit the code according to what you want to draw.

    Let us say that the file draw.txt contains the following code:

    tell application "OmniGraffle Professional 5"
        tell canvas of front window
            make new shape at end of graphics with properties {corner radius: 15, size: {100, 30}, origin: {50, 50}}
        end tell
    end tell
    

    Here is how to run the script and draw the shape:

    $ osascript draw.txt