DekGenius.com
[ Team LiB ] Previous Section Next Section

How This Book Is Organized

This book is divided into four sections:

Part I, AppleScript Overview

Part I consists of general introductory material, explaining what AppleScript is, motivating the reader with examples of various ways and means for putting AppleScript to use, and defining fundamental terms that the reader will need to understand.


Chapter 1

Provides some motivational guidelines and real-life examples intended to answer such big existential questions as what AppleScript is good for and why you would want to use it anyway.


Chapter 2

Surveys the various areas of the computer where AppleScript can be employed—for example, by running a script in the Script Editor, by calling into AppleScript from some application's internal scripting language, or by way of a Unix scripting language like Perl.


Chapter 3

A brief hands-on tutorial or walk-though, illustrating what it's like to plan and implement a task using AppleScript in real life.


Chapter 4

An explanation of the technologies underlying AppleScript and a glossary of fundamental terms. This is where the technical discussion starts. If you already know something about AppleScript and don't need to be motivated to use or learn it, you might skim or skip the first three chapters, but you should definitely read this one, since the rest of the book depends upon it.

Part II, The AppleScript Language

Part II develops AppleScript as a programming language. Learners should read the chapters in order; experienced users may employ this section as a linguistic reference.


Chapter 5

A subjective description of what AppleScript is like as a language, just to give you a sense of what you're getting into.


Chapter 6

Describes some fundamental externals of the language, such as lines and comments.


Chapter 7

Discusses aspects of variables, such as how to assign and declare them, and how scoping and persistence work.


Chapter 8

Discusses handlers (subroutines)—in particular, such matters as how to declare and call them, how their scoping works, and how they operate as values.


Chapter 9

Discusses script objects (scripts within scripts), including how to refer to them, how their scoping works, how to load and save them dynamically, and how inheritance works.

Taken together, Chapter 6 through Chapter 9 comprise a survey of the constituent parts of an AppleScript program.


Chapter 10

Describes how objects and their attributes (properties and elements) are referred to.


Chapter 11

Describes how the way in which objects and their attributes are referred to can be encapsulated into a value.


Chapter 12

Surveys the linguistic structures for determining the flow of an AppleScript program, such as branching, looping, and error handling.


Chapter 13

A guide to the built-in classes of variable value (such as integers, strings, lists, and records) and how they work.


Chapter 14

Explains how one datatype may be turned into another datatype explicitly or implicitly.


Chapter 15

Catalogues the various ways to test and combine values, such as addition, comparison, and concatenation.


Chapter 16

Catalogues some built-in variables, such as pi. (You didn't know pi was a variable, did you?)


Chapter 17

Catalogues some built-in enumerations and classes that behave as reserved words.


Chapter 18

Catalogues those few built-in verbs not previously covered.

Part III, AppleScript in Action

Part III describes aspects of AppleScript in practice and in relation to the wider world.


Chapter 19

Talks about the mechanism whereby applications make themselves scriptable through AppleScript by extending the AppleScript language, and explains how terminology is resolved, how to read a dictionary, and what a dictionary is good for and not good for.


Chapter 20

Talks about code resources that extend the AppleScript language without reference to any particular application. It surveys the built-in scripting additions and provides some additional technical details.


Chapter 21

Explains how to drive applications with AppleScript, whether they are on the same or a different computer, including certain kinds of web services. It also mentions a few useful scriptable applications that come with Mac OS X but that the reader might not otherwise be aware of.


Chapter 22

Talks about how AppleScript can be used together with the System's Accessibility API to automate the interface of applications that are not directly scriptable.


Chapter 23

Talks about how AppleScript can call the Unix shell command line and how Unix scripting languages can call AppleScript.


Chapter 24

Discusses ways to turn an AppleScript program into a standalone application, ranging from a simple applet to a full-fledged application with a true user interface written in AppleScript Studio.

Part IV, Appendixes


Appendix A

Presents a listing of AppleScript's own hidden dictionary, where the terms of the language itself are embodied.


Appendix B

A list of references and further readings. If this book mentions an application you've never heard of, or you want to know how to learn more about AppleScript, this appendix is the place to come.

    [ Team LiB ] Previous Section Next Section