Re: General questions from a non-Applescript coder.
Re: General questions from a non-Applescript coder.
- Subject: Re: General questions from a non-Applescript coder.
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 27 Apr 2005 17:05:05 -0400
Just wanted to pipe in here that I'm in pretty much the same boat, just
a few months ahead of you, having gotten my OS X box in
November. I've mostly used it like a Linux box that can run
Office, but I'm slowly getting into more Mac-specific things.
Historically, I've programmed in zillions of languages, from machine
language to ML to Smalltalk and various stops at the levels in
between. My favorite lang is Ruby. What I actually use on a
day-to-day basis is mostly Perl and sh/ksh/bash (and associated tools
like awk etc), with some Java and _javascript_ thrown in, and the very
occasional bit of Python or even PHP. I've only just begun adding
AppleScript into the mix; I'm learning it because it really is the
best-supported way to script applications on the Mac, and you can do
things with it that are just nowhere near as easy otherwise, even with
the whole UNIX API to work with.
Actually getting a given bit of AS to work can be quite frustrating,
though. There are problems with AS itself - for someone coming
from a programming background, having things like namespace scope and
pollution prevention drilled into our heads, being faced with a
language that just basically says "eh" to all that, risking name
conflicts galore, is maddening. As is the total lack of
structure; there is, IMO, a bit too much freedom in what app developers
can do with the syntax.
But the most frustrating thing is the variation in application
scripting support. Many apps don't have it at all; many that do
have woefully insufficient documentation in their dictionaries; some
have plentiful documentation that's full of bald-faced lies.
Right now, I do some GUI scripting to set things in System Prefs that
aren't scriptable. I also have a menu widget for getting in touch
with whoever's currently on call in our group (which, to be fair, is
actually populated by Perl rather than AppleScript; I use AliasMenu to
get it onto the menu bar, and the actions are all compiled AppleScript
apps - to open a web page with their full contact record (Firefox
doesn't yet understand .url or .webloc files), open up an AIM chat
window to them, send 'em an email message, etc.).
On 4/27/05, Shawn Milo <email@hidden> wrote:
Hi! I've only been a Mac user since January, but I'm an experienced
coder in VB, VBScript, _javascript_, and Net.Data. I also have some
working knowledge of Python, Perl and bash scripting. I know basically
nothing about Java, C++, and the like. I use the Mac (my main machine)
and Linux (my servers) at home, and Windows XP at work.
So, here are my questions:
1. Should I learn Applescript? To some extent, it seems foolish not to
stick with Python and bash scripting, since that's applicable outside
of the Mac environment, and I can share code with more people. Is this
a case where the answer depends solely on whether I intend to script
to Mac apps such as iTunes and Finder, or just do other
maintainance/one-off scripts?
2. When Automator is used, and the procedure is saved, is it in
Applescript? I can see how being able to share and edit these scripts
would be immensely useful.
3. Is there a "must-have" book for beginners? I usually learn much
better if I tackle a small script, and then use Google and a mailing
list when I get stuck. But it's nice to have a reference book. I'll
never read one beginning-to-end like I'm taking a class, so I like to
have something more like a reference than a textbook, although I like
one with plenty of working examples of the syntax. From the Amazon
reviews, it seems like "AppleScript : The Definitive Guide" by Matt
Neuburg is well-regarded, as is the "Missing Manual," by Adam
Goldstein.
4. In the reviews for the "Definitive Guide," it is made pretty clear
that Applescript has, or at least had, "as a language and development
environment has some terrible problems," and "when you're banging your
head against the keyboard because a script doesn't work as expected,
it's good to know that the language is not without unique
'personality' and that you're not alone." Those two quotes were from
two separate, well-written and coherent reviews, written in 2004. Has
the language evolved since then?
I would really appreciate answers to one or more of these questions
from several people, in order to get a better sense of Applescript,
especially question four. I hope no one interprets that question as a
jab at AS -- I'm really interested in getting involved, but I thought
I should ask those "in the know" before I jump in with both feet.
Thanks, all!
Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden