Edit > Copy As > AppleScript seems to generate non-compiling Applescript code.
For example, selecting a simple shape and choosing
Edit > Copy As > Applescript
Generates (and places in the clipboard) code of the form:
The first line of which seems to be incorrect:
fails on my system, and requires manual amendment to:
OR more durably, and in accordance with Apple's current guidelines:
(which would have a better chance of generating code reusable in any subsequent OmniGraffle 6, but only works with OS X 10.5 and upwards)
(Logged to ninja feedback)
--
For example, selecting a simple shape and choosing
Edit > Copy As > Applescript
Generates (and places in the clipboard) code of the form:
Code:
tell application "OmniGraffle Professional" tell canvas of front window make new shape at end of graphics with properties {name: "RoundRect", textSize: {0.800000, 1.000000}, textPosition: {0.100000, 0.000000}, origin: {87.000000, 125.000000}, size: {163.000000, 303.000000}} end tell end tell
The first line of which seems to be incorrect:
Code:
tell application "OmniGraffle Professional"
Code:
tell application "OmniGraffle Professional 5"
Code:
tell application id "com.omnigroup.OmniGrafflePro"
(Logged to ninja feedback)
--
Last edited by RobTrew; 2010-04-15 at 11:31 AM..