Chapter 12. Script Objects

You've seen the word scrip used throughout this book. I have used it interchangeably with the word program. You used Script Editor to edit and run your programs, and you saved your files as script files with extensions of .scpt. But what exactly is a script? Technically, all the programs you have written in this book are scripts, or script objects. As you learn in this chapter, you can define other script objects to group related variables (or properties), handlers, and other script objects. If you're familiar with other object-oriented programming (OOP) languages like Objective-C or C++, you see in this chapter that script objects also share some OOP features. These features include inheritance, instantiation, data encapsulation, and polymorphism.

Get Beginning AppleScript® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.