Applescript doesn't have much in similarity with shell scripts, but
it's a very (almost excessively) verbose scripting language easy to
master if you care to learn.  Shell scripts can be used on macosx too
(now officially Unix, as of Leopard), which I happen to write quite
frequently in combination with launchd.  Also, I find that shell
scripting is far more advanced and also predates and inspired the
"invention" of batch files.  But if you're extremely new to
programming, I'd recommend Applescript over shell scripting.  Some of
the applescripts almost sound like English when you read them out
loud.  Here's an example of how simple it can be.  Make sure iTunes is
closed, and then open the application called Terminal inside the
Utilities folder in the Applications folder.  Inside terminal, type in
the following exactly, including the correct quotes:
osascript -e 'open application "iTunes"'

iTunes should have opened.  And like I said, it's practically like
spoken English.  If you replace open with quit, then iTunes will quit
or prompt you to quit if it's actively doing something.

Why would you use applescripts?  Mostly to extend or simplify the
capabilities of existing programs.  Cocoa apps have a certain amount
of applescriptability built in.  If you've used Automator, it's the
exact idea..in fact, Automator uses Applescript so you don't have to
look at a single line of code.  My favorite scripts are the ones for
iTunes that batch-edit songs, like to capitalize the names correctly
and other tagging mistakes for the music.

cheers,
jane

On 10/9/07, Jude DaShiell <[EMAIL PROTECTED]> wrote:
> I don't know what computer background you had before you started to use a
> mac so answering that question may go way over your head or then again
> maybe not. in Linux and Unix shell scripts can be written; these are one
> step below executable programs in terms of capabilities for doing things
> on your system.  Dos had batch language and the Linux and Unix script
> languages are a superset of dos and windows batch language.  In other
> words all that can be done with dos and windows batch languages can also
> be done by Unix and Linux script languages but the Unix and Linux script
> languages can do more.  Apple scripts are equivalents of Unix and Linux
> script language programs and may be even more capable.  I'm researching
> that.  Tutorials for apple script exist on the web too.

Reply via email to