On 12/15/04 6:30 AM, "Peter C.S. Adams" <[EMAIL PROTECTED]> wrote:
> Thus spake Paul Berkowitz <[EMAIL PROTECTED]>, circa 12/14/2004 8:42 PM:
>> tell application "Microsoft Entourage"
>> set include in random of every signature to true
>
> I remember when Apple first announced AppleScript, they hailed it as an
> "English like" programming language "for the rest of us."
>
> Based on examples like the above, I think it's more like a "Yoda like"
> language. :->
The choice of the name of this property ('include in random') was made by
the Entourage developers, so don't blame Apple this time. Generally
speaking, Entourage's syntax is pretty clear and "English-like" (I think
you're not going to want to dip into Word's new syntax which is anything
but, for good but unfortunate reasons) but this is an exception. Because it
has an unlikely declension of an English verb ('include' - is this the
imperative mood? second person indicative?) inside a phrase used as a noun,
it doesn't read well, to say the least. But it is descriptive. The 'include
in random' property of a signature is equivalent to the "Random" checkmark
in the Signatures list which indicates whether a particular signature is to
be included in the subset of those which are used randomly in accounts where
you choose the "default" signature to be random - or not. (I.e. some of you
signatures, like your Work signature or your basic Standard signature will
usually not be checked as part of this "random" group.) So maybe this
property could have been called 'membership in the list of signatures to be
used when random signatures are specified for an account' property but that
seems rather unwieldy, don't you think? (The command would then be
set the membership in the list of signatures to be used when random
signatures are specified for an account of every signature to true
Not much of an improvement, is it? But 'membership' - a noun - rather than
'include' - a verb, reads better. Maybe a good shorthand would have been
'membership in random list':
set the membership in the random list of every signature to true
Still not much better. See how 'include in random' gets the idea across in
fewest words? Once you understand what's being set here, it does fall into
place more easily.
>
> I can always understand a script I see, like the one above, but I can never
> make heads or tails of the syntax when I'm trying to write one myself ....
Well, that might be because you haven't studied AppleScript? As Allen says,
the new book by Hanaan Rosenthal might be the best book for beginner to
advanced (although it's rather massive at 888 pages; you can omit some
sections). It's certainly thorough. Within a few months there will also be a
new Missing Manual for AppleScript (it's advertised at the O'Reilly Center
as due for release in February) which is not likely to be nearly as thorough
but might get you off to a start.
--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>