[Pythonmac-SIG] using py-appscript

David Morley davidmorley at luckmor.com
Tue Sep 9 11:06:57 CEST 2008


I can use (Python) appscript  reasonably well, if I know exactly what
"components" I am looking for, e.g.,

app('TextEdit').documents['Read Me'].paragraphs[1].get()

But if I'm faced with a new application I don't know where to start.
Is there any way to interactively explore what is available? Something
like
    dir(app('TextEdit')) -> [..., "documents", ...]
to let me know that the app has document components
    app('TextEdit').documents.keys() -> [..., "Read Me", ...]
to let me know that "Read Me" is one of the documents
and so on.
- David


More information about the Pythonmac-SIG mailing list