[Pythonmac-SIG] aeve app.make help

Winston Wolff stuff at obsidiancore.com
Sun Nov 30 01:11:00 EST 2003


Would somebody be able to help me with aeve?  I'm trying to automate 
OmniGraffle along the lines of this example:
	http://www.designweenie.com/content.php/mappingWithGraffle01.php
Eventually I want to generate various UML diagrams in OmniGraffle.  But 
first I'm having trouble just getting the hang of AppleScript via 
Python.  I've never used AppleScript, but I've gone through the 
AppleScript Language Guide.  So far I've successfully installed aeve 
(0.0.4), the iCal example works, and now I want to do the equivalent of 
this in Python:

tell front document of application "OmniGraffle"
	set shp to make new shape at end of graphics with properties ¬
		{origin:{100, 100}, size:{20, 20}, draws shadow:false, name:"Circle"}
end tell

And this is what I've got so far:

	import aeve
	app = aeve.talkto('/Applications/OmniGraffle.app')
	from aeve.Applications import OmniGraffle as og

	origin 	= og.???._aereg_.iterObjectsForName("origin", 
aekind="property", deep=True).next()
	size 	= og. .???.._aereg_.iterObjectsForName("size", 
aekind="property", deep=True).next()
	name 	= og. .???.._aereg_.iterObjectsForName("name", 
aekind="property", deep=True).next()

	shape = app.make(new=og.shape, with_properties={ origin:(100,100), 
size:(20,20), name:"Circle" } )

The problem seems to be this iterObjectsForName() call.  I don't know 
what object to send this call to.  Can anybody help?

Thanks,

Winston
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2644 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031129/8f340dd3/attachment.bin


More information about the Pythonmac-SIG mailing list