[Pythonmac-SIG] appscript and XXXX - what is my app instance returning?

has hengist.podd at virgin.net
Thu Mar 31 20:50:17 CEST 2005

Paul Berkowitz  wrote:

>If appscript
>is meant to replace the vagaries of AppleScript with the sanity of Python,
>there's no getting around the fact that its whole raison d'être - healthy
>application scripting - can founder on poorly implemented application
>AppleEvent syntax, with no one around to explain it, let alone fix it.

The 'syntax problem' I mention is common to both AppleScript and 
appscript and has _nothing_ to do with individual applications' Apple 
event support.

The problem is that both wrap Apple events in a very OO-like syntax 
which is easy to use and perfectly sound in itself, but tends to 
mislead unwary users who assume that because it looks like OO it *is* 
OO. Which it's not: it's an RPC interface plus simple relational 
query builder. While I could change appscript's syntax to make it 
look less OO-like, it would also make it less easy to use. The 
solution is better education (starting with better documentation, 
obviously) so that appscript users aren't labouring under any false 
assumptions when they start to use it.

BTW, the last place to learn this stuff is from AppleScript, which 
plays even more syntactic and semantic tricks and is even worse about 
informing its users of this. It's something we Python folks will have 
to provide for ourselves, and I'm sure we will.

All of which is a completely separate issue to learning how to 
effectively script individual applications, which is the problem the 
OP's having. That has nothing to do with the language/bridge used, 
and everything to do with learning how an application's Apple Event 
Object Model works, what it can and can't do, where all the quirks 
and bugs lie, etc. Information that should be supplied by application 
developers, of course, but they often don't so users often have to 
rely on experimentation and shared knowledge to fill in the blanks.

Personally I don't think the language difference should be too much 
of an issue when asking application-related questions, though we'll 
only find out for sure when appscripters start asking these questions 
on traditionally AppleScript-oriented lists such as MacScrpt. (As 
opposed to Python/appscript-related questions, which are still best 
asked here.)


More information about the Pythonmac-SIG mailing list