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

has hengist.podd at virgin.net
Fri Apr 1 02:37:41 CEST 2005


Paul Berkowitz wrote:

>  > Personally I don't think the language difference should be too much
>  > of an issue when asking application-related questions,
>
>I think it might be an issue.

Didn't say there wouldn't be any issue at all; of course there'll be 
a degree of mismatch any time someone posts an appscript/AppleScript 
code sample. I assume there will be sufficiently enlightened folk 
around who won't let the unfamiliar accent get in the way of trying 
to be helpful to one another.

And some questions will go to the wrong forum: application-specific 
questions to here, appscript-related questions to there. One of the 
reasons I recommend MacScrpt is that there's at least one person 
reading it daily who can pick up any of the latter.


>Python users who know appscript but not
>AppleScript will tend to ask questions about application scripting in a way
>that AppleScripters who don't know Python won't understand.

The fact that most ASers don't know Python isn't an issue. The fact 
that most are borderline computer literate at best is a bit of a 
pest, since it means they won't be very good at recognising the 
common underlying concepts. Appscript users will need to take a 
degree of care in how they phrase application-specific questions. But 
what's new?

As an example, the OP's question breaks down into two parts: how does 
appscript work, and how does Quark work. Assume that an appscript 
expert will answer the former, and rephrase bits of the latter so 
that Quark experts will be more able to take a shot at it. Better 
appscript documentation should ensure appscript users understand how 
the bridging technology works, allowing them to better separate 
application-specific questions from appscript-related ones before 
asking them. Learning how to ask questions clearly and precisely is 
something everyone has to learn. It's not like there's any shortage 
of vague, confused and downright undecipherable questions already 
being asked on AS lists.


>(Somehow I don't see Shane Stanley answering too many appscript questions
>about Quark.)

Who knows? Hopefully he'll answer Quark questions about Quark. 
Hopefully if someone asks a Quark question that's all muddled with an 
appscript question he'll ask for the question to be rephrased so it's 
easier to understand. And maybe someday he'll decide that knowing a 
bit about Python+appscript will be useful in its own right, and will 
then be able to answer appscript-specific questions too (when he 
feels like it). Python's a much better development tool than 
AppleScript, after all, and as a shrewd professional workflow 
developer he ought to recognise the commercial benefits of it.


>That will keep you quite busy. If I, or other AppleScripters,
>ever manage to get around to learning Python properly and then appscript, we
>might be able to pitch in.

You don't need to be an expert in Python to answer questions about 
application scripting. Understanding the fundamental principles by 
which something operates is way more valuable, since that knowledge 
is transferrable with little effort. Literals, variables, 
conditionals, commands, references, etc. are all common to both AS 
and Python and should be recognisable even without knowing the 
language itself. I mean, seriously, any moderately competent 
AppleScripter who understands what these things actually are and 
still can't figure out that:

     app('TextEdit').documents[1].text.get()

is equivalent to:

    tell app "TextEdit" to get text of document 1

in their native tongue really isn't trying. Ditto the reverse.

Nobody's expecting an ASer to write a fluent Python solution in 
response to a question by a Python user. Nor do they need to: a 
fluent AppleScript solution will do just fine. Writing code may be 
hard but _reading_ code is a piece of piss. And all that anyone needs 
to do is read code just well enough to infer its meaning, something 
both languages make pretty easy.

Furthermore, the more that folk ask and answer questions on-list, the 
better they'll become at doing it. I don't expect the first burst of 
communication to be instant and flawless; it's a learning process and 
is going to take a bit of time and a bit of work by all parties.


>But even the very limited documentation that
>application creators provide for their AppleScript implementations will not
>be extended to appscript, or even to raw AppleEvent documentation (I think
>FMP may provide a bit of that.) It will mostly be up to you.

I won't be answering technical questions on QXP, ID, FMP, Entourage, 
etc. myself because I'm not an expert in scripting any of them. I 
will be around to ride shotgun on them, filtering the appscript 
issues from the application issues where necessary (and I hope other 
appscript veterans will feel free to chip in here too;).


I think you're overanalysing; worrying too much. AppleScripters may 
not always have a clue what they're talking about and be a bit prone 
to the Not Invented Heres, but on the whole they're a decent 
enthusiastic bunch of folk who genuinely want to help others and are 
willing to work at it. Main thing now is for application scripting 
questions to move off here and onto MacScrpt so we can at least get 
started on making this happen (I think we'll all agree that PythonMac 
isn't the most useful or appropriate place for discussing this 
stuff). Once there, we can knock out any kinks as we go.

Cheers,

has
-- 
http://freespace.virgin.net/hamish.sanderson/


More information about the Pythonmac-SIG mailing list