[Pythonmac-SIG] make locations with aeve

Winston stuff at obsidiancore.com
Thu Dec 4 12:28:30 EST 2003


Has-

Well, AppScripting works well, so I'm on my way to generating diagrams 
in OmniGraffle programmatically.  It's pretty fun to write little 
python lines and see boxes and circles immediately appear on the 
screen.

Thanks everyone for the help -- Bob, Jack, Has, and anyone else I 
forgot.  Also to one person who speculated I had OmniGraffle 2, yes you 
are right.  I haven't bothered to get OmniGraffle 3 yet.

-winston


> From: has <hengist.podd at virgin.net>
> Date: 1-December-2003 5:22:15 PM PST
> To: pythonmac-sig at python.org
> Subject: Re: [Pythonmac-SIG] make locations with aeve
>
>
> Bob 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.
>>>
>> [...]
>> It doesn't look like the scripting terminology actually says that you 
>>  can get graphics from a document..
>
> It does - see OmniGraffle suite > document class > Elements > graphic
>
>
>> You could try AppScripting until then.
>
> You can, but mind it's still very rough and nowhere near ready for 
> primetime. Right now its major problem is lousy handling of enums, and 
> this'll cause some stuff to barf. (This'll be sorted by the next 
> release, once I've figured out a decent solution.)
>
> Anyway, using v0.2.0:
>
>     import AppScripting as AS
>
>     omnigraffle = AS.app('OmniGraffle.app')
>
>     omnigraffle.documents[0].graphics.end.make(
>             new='shape',
>             with_properties={
>                     'origin': [100, 100],
>                     'size': [20, 20]})
>
>
> Note here that AS provides a special-case for the 'make' command, 
> whereby it can use the reference upon which it's called as its 'at' 
> parameter (see Manual.txt for details). But if that freaks you out, 
> you can still use the 'traditional' form:
>
>     omnigraffle.make(
>             new='shape',
>             at=omnigraffle.documents[0].graphics.end
>             with_properties={
>                     'origin': [100, 100],
>                     'size': [20, 20]})
>
>
> HTH
>
> has
> -- 
> http://freespace.virgin.net/hamish.sanderson/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2474 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031204/3bceddef/attachment.bin


More information about the Pythonmac-SIG mailing list