• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simple applescriptable diagram maker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple applescriptable diagram maker


  • Subject: Re: Simple applescriptable diagram maker
  • From: Rob Lewis <email@hidden>
  • Date: Sat, 09 Apr 2016 17:28:45 -0700

Hmm, interesting. It certainly looks wrong. 

I see that OG is up to v. 6.5.2 now, so perhaps your older version isn’t compatible with newer OSs. 

Also, I seem to recall that only the “Pro” version is scriptable (though I could be wrong). Worth checking, though. 

Omni Group has pretty responsive support, as well as forums including one on AppleScript. 

FWIW, here’s what I get when I create a new document, add a rectangle (with the default gray fill), and “Copy as AppleScript”: 

tell application id "com.omnigroup.OmniGraffle6"
tell canvas of front window
make new shape at end of graphics with properties {draws shadow: false, size: {341.000000, 211.000000}, origin: {291.000000, 318.000000}, fill color: {0.749020, 0.749020, 0.749020}}
end tell
end tell

HTH (and you’re welcome :-)

—RL


On Apr 9, 2016, at 17:08 , Christian Boyce <email@hidden> wrote:

When I try the "Copy as AppleScript," I get an AppleScript that won't work:

tell application "OmniGraffle"
tell canvas of front window
make new shape at end of graphics with properties {(null): {227.613281, 79.898438}, (null): {250.699219, 135.812500}, (null): {0.404275, 0.333180, 1.000000}}
end tell
end tell

The "null" stuff has to be wrong. This is OmniGraffle 4.1.2, Mac OS 10.11.4.

This was the easiest test case I could make: a new document, one shape in it (rectangular). But it didn't work. 

What a wild, crazy, fabulous feature this could be for me though. I've never heard of such a thing. Thank you for pointing it out!


On Apr 7, 2016, at 12:18 PM, Rob Lewis <email@hidden> wrote:


One feature that can be a godsend is the command to “Copy as AppleScript”. You can just make a selection in your drawing and then use this command. It will place the AppleScript code to recreate the item(s) on the clipboard. From there you can paste it into your script and tweak as desired. (I suppose you could store the code in a field in your database, too.) 



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Simple applescriptable diagram maker
      • From: David Gregg <email@hidden>
References: 
 >Re: Simple applescriptable diagram maker (From: Rob Lewis <email@hidden>)
 >Re: Simple applescriptable diagram maker (From: Christian Boyce <email@hidden>)

  • Prev by Date: Re: Simple applescriptable diagram maker
  • Next by Date: Re: Simple applescriptable diagram maker
  • Previous by thread: Re: Simple applescriptable diagram maker
  • Next by thread: Re: Simple applescriptable diagram maker
  • Index(es):
    • Date
    • Thread