[Pythonmac-SIG] make locations with aeve

Bob Ippolito bob at redivi.com
Mon Dec 1 18:10:18 EST 2003


On Dec 1, 2003, at 5:26 PM, Just Stuff wrote:

> Okay, I've got another question now about the make() command.  I'm  
> still trying to execute this applescript, and I've got all the  
> properties working.  But I need to specify this "at end of graphics"  
> argument.
>
> tell front document of application "OmniGraffle"
> 	set shp to make new shape ¬
> 		with properties {origin:{100, 100}, size:{20, 20}} ¬
> 		at end of graphics
> end tell
>
> Here's what I've got so far in python:
>
> import aeve
> app =  
> aeve.talkto('com.omnigroup.OmniGraffle')	#'/Applications/ 
> OmniGraffle.app')
> from aeve.Applications import OmniGraffle as og
>
> shape = app.make(new=og.shape,with_properties={ og.graphic.origin:  
> [100, 100], og.graphic.size: [20, 20], og.shape.name: 'Circle' } )
>
> But it fails because it doesn't have the at ... argument, i.e. if I  
> run the applescript without the at... argument, I get the same error.   
> Any hints?

It doesn't look like the scripting terminology actually says that you  
can get graphics from a document.. it's possible (but extremely  
awkward) to build this kind of reference, and I don't remember how off  
the top of my head.  I guess you will have to wait for the next version  
of aeve.  You could try AppScripting until then.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031201/d09565d2/smime-0001.bin


More information about the Pythonmac-SIG mailing list