I am having much fun with appscript and QuarkXpress6.x
The appscript module is such a fantastic piece of code. It lets novices wander right into the thick of AppleScript without requiring intimate knowledge of AppleScript's eccentricities.
Unfortunately, when you do get lost like I am. You're completely lost.
""" Would someone please share their method for figuring out what my app instance is returning, and how I can coerce that into a form I can utilize? """
In case you are not familiar with QuarkXpress, it is a Professional Desktop Publishing App with a completely object oriented element model. Virtually every nuance of every element of every document of every window is exposed to AppleScript. Hence appscript has a very rich playground to wrap.
I've tried using dir() and end up in endless loops of auto-created stem code, with methods and classes pointing everywhere. Wow, there is a LOT of it available in layers like an onion. Too bad I am such a NOOB
other things I've tried. . .
Quark = appscript.app('QuarkXpress') pw = Quark.documents[1].page_width #This is what I want
>>> type(pw) <class 'appscript.specifier.Specifier'>
>>> pw.get() <_AE.AEDesc object at 0x1181c38>
>>> type(pw.get()) <type '_AE.AEDesc'>
>>> pw.help() =================================================================== Appscript Help (-t)
Reference: app(u'/Applications/QuarkXPress 6.1/QuarkXPress').documents[1].page_width
------------------------------------------------------------------------ --------
Description of reference
Property: page_width : k.horizontal_measurement (r/o) -- the width of a page in this document
Terminology for horizontal_measurement class
Class: horizontal_measurement --
===================================================================
OK, I think pw.get() returns an instance of a horizontal_measurement. Where do I go from here?
Much Thanks
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig