Cole McDonald's
AppleScript Studio Tutorial

AS Lessons | AS Studio Lessons | Element Short List | Element Full List | Container Views | Data Sources | Menus


Back To Table Of contents


Introduction To AppleScript!


You are here to learn to program! I'm starting this way to stop any debate about whether AppleScript is a programming language or a scripting language. I will not be treating it as either here. I am going to teach the things you need to know to program using applescript as an easy to learn alternative to PASCAL, LISP, PERL or any of the other alphabet soup names of programming languages. I am using applescript because it is more approachable by younger people than ugly half-commands that only make sense to people who know what to look for.

I'm choosing AppleScript because it is closer to english than any other programming languages I've come across. This will allow me to teach the fundamentals of programming more quickly as there will be less industry terms and scary code for people who have no programming experience whatsoever.

AppleScript is a very powerful tool for writing software that makes programming approachable for people who wouldn't otherwise come anywhere near programming. The biggest problem with AppleScript is that no one knows about it unless they have already used it or are specifically looking for it. It is truly a hidden treasure!

I will be guiding you through making a program that does nothing more than display a message to the world. It will not be "Hello World!" as in every other programming introduction. I will leave the message up to you, so start thinking about it now. We will start with this simple program because I feel that the most important thing in programming is communicating with the user (the person using the program).

From there, we will talk about how to let the user talk to your program. Of course, when they do that, you're going to want to be able to used the information they give you. This will guide us in to data (information) storage.

Next, you will want to be able to have your program do different stuff based on the data you've collected from your user. We will discuss several ways to do this.

After that, we will discuss more complicated ways of doing these same things. We will also talk about how to make your program run as fast as possible.

Let's get into it!

Tool Of The Trade

You will be using one program in this tutorial, Script Editor. This program is neatly hidden away in the Applications folder in your Hard Drive, in a folder called AppleScript. This program should probably go in your Dock as you'll be using it throughout this tutorial. Double-Clicking the program (or single clicking it in the Dock) to open it will present you with a blank window. This window has two sections. The top section has no bearing on this tutorial, so you can close it up by clicking on the little arrow to the left side of it. The bottom section is where we'll be doing our business. This is where all of the magic happens.

It is basically just a word processor. There are special features to this word processor. If you look under the menus, you will see several terms that are unfamiliar from working in word processors. Under the Controls menu, you will find most of the things you will be using for this tutorial. Run (Apple-R), Stop (Apple-.) and Open Event Log (Apple-E) (learn the keystrokes for them) will be used extensively. Other than that, the New Script (Apple-N), Save (Apple-S) and the Open Dictionary, will be the only others we will be concerned with.

Lets move on to the first Script you will write!

Next Lesson - Communication With The User - Display Dialog