AppleScript Tutorial


Learn to Automate


AppleScript comes pre-installed on all Apple Macintosh computers, including all the tools needed to get started. Whether you just want to use existing scripts or write your own, AppleScript can save you many hours of repetitive work, improve accuracy and add features to your software.



I am in the middle of polishing this tutorial for Mac OS X. You should see a lot of changes here over the next few weeks, and then, finally, some additional tutorials.



First, please read this introduction to the series of AppleScript tutorials, with background, purpose, scope, requirements, and explanation of the tools used.



Answers questions such as:

01 Using Scripts


  • How do I install scripts and use a Scripts menu?
  • How can I use a script to add a custom function to a spreadsheet?

02 Examining
and Customizing


  • What does a script look like?
  • How can I change a property of a script?
  • How do I open, duplicate and save a script?
  • How do I make a script into an application that I can double click in the Finder?

03 The Dictionary


  • If AppleScript language is so “human” why doesn’t any instruction work?
  • How do I know what commands are understood by an application?
  • What is an AppleScript dictionary, how do I view it and how is it organized?
  • What’s the difference between a class, command, property and parameter, and where are they in the dictionary?

04 Classes


  • What is an “object” and a “class”?
  • How can I determine the class of a particular object?

05 Elements


  • What is the “object model”?
  • How can I refer to a specific element?
  • What is a “reference form”?

06 Properties


  • How can I change an object?
  • How do I know what properties I can change?
  • How do I know the class of a property?
  • What values can I give to a property?

07 Specifying
an Object


  • What’s the difference between a property and an element?
  • How do I specify a particular object?

08 Getting Objects
and Properties


  • I can format an object manually. How can I write a script to apply the same formatting?
  • How can I write a script to affect the selected graphic object or text?
  • How do I get the specification of the selected object?
  • Can I see a list of current objects and their properties?

09 Commands


  • What is an command? What is a parameter?
  • What commands can I give to an application?
  • How can I modify the behavior of a command?
  • Which parameters are optional and which are required?
  • If there doesn’t appear to be a command to change what I need, how can I script it?

10 The “Make”


  • How do I make a new document, graphic object, record or other element?
  • How do I specify the initial properties of a new object?
  • Where can a new object be placed?

© 1998 - 2004 BareFeetWare
Please email us any queries about this page.