Apple-scripting "Place Image..." ?

A. James Boswell boswellj at nortelnetworks.com
Mon Jul 14 15:44:03 PDT 2003


On Tuesday, July 15, 2003, at 02:36  AM, Greg Titus wrote:

> You are looking for the "image" property on the "solid" class. A 
> script like this should do what you want:
>
...

Thank you! that is exactly what I was looking for :-)

> ...
> Note that this isn't an exact analogue of the "Place Image..." 
> behavior because it sets the image fill of an existing shape instead 
> of creating a new shape for that image. The difference is, you'll need 
> some other way of determining the image's natural size, since that 
> isn't exposed to AppleScript in OmniGraffle.
>
>
> Here is a script which _is_ an exact analogue of "Place Image...", 
> using Standard Scripting Additions to open up a panel to ask you for 
> an image file, then using Image Capture Scripting to determine the 
> image size, then creating the shape and setting its image fill in 
> OmniGraffle:

I already have file path and size, so the first version works well.

> ...
> Hope this helps,

Very much so. Thanks a bunch :-)

Next question, (gee - give em an inch...). Is there an analogue to this 
that will set an image to a URL from the web? (Sorry I'm at work and 
can't test if "set image" works with a url or not).

Cheers

AJB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1236 bytes
Desc: not available
Url : /mailman/archive/omnigraffle-users/attachments/20030714/6b271925/attachment.bin


More information about the OmniGraffle-Users mailing list