Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X
Hanaan Rosenthal, Hamish SandersonBooks.org participates in affiliate programs including Bookshop.org and the Amazon Services LLC Associates Program. We may earn a commission from qualifying purchases made through links on this page, at no additional cost to you.
Overview
AppleScript is an English-like, easy-to-understand scripting language built into every Mac. AppleScript can automate hundreds of AppleScript-able applications, performing tasks both large and small, complex and simple.
Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition has been completely updated for Mac OS X Snow Leopard. It’s all here, with an emphasis on practical information that will help you solve any automation problem—from the most mundane repetitive tasks to highly integrated workflows of complex systems.
- Friendly enough for beginners, detailed enough for advanced AppleScripters
- Includes major contributions from expert AppleScripters: Emmanuel Levy, Harald Monihart, Ian Piper, Shane Stanley, Barry Wainwright, Craig Williams, and foreword by AppleScript inventor, William Cook
- See how AppleScript represents information as objects—including numbers, strings, lists, and records.
- Learn how to manipulate these objects using commands and operators, and how to store them in variables.
- Organize your code using handlers and script objects.
- Understand how applications describe their objects and commands in dictionaries and how to interpret that information when learning to script applications.
- Manipulate the Mac OS X file system.
- Automate iTunes, Mail, iCal, and other popular lifestyle applications in Mac OS X.
- Discover sophisticated text processing techniques using regular expressions.
- Script professional productivity applications—Apple iWork, Microsoft Office, FileMaker Pro, and Adobe InDesign.
- Harness the power of the Unix command line in Mac OS X.
- Create your own Cocoa applications with the new AppleScriptObjC bridge.
- First-time scripters who want to automate tasks on their Macs
- Existing AppleScripters looking to develop proficient, professional, or guru-level knowledge and skills
- Professional Mac OS X developers wishing to understand this powerful and pervasive technology
Table of Contents
- Introducing AppleScript
- AppleScript in Principle
- AppleScript in Practice
- Writing Scripts in AppleScript Editor
- Understanding How Application Scripting Works
- Learning to Work with AppleScript Objects
- Working with Text
- Working with Numbers
- Working with Dates
- Working with Lists and Records
- Storing Objects in Variables
- More on Commands
- More on Operators and Coercions
- Making Decisions Using Conditionals and Loops
- Making Decisions When Dealing with Errors
- Interacting with the User
- Working with Files
- Organizing Your Code with Handlers
- Organizing Your Code with Script Objects
- Scripting the File System
- Scripting Apple Applications
- Extending AppleScript with Scripting Additions
- AppleScript Amenities
- Scripting iWork and Office
- Scripting Data and Databases
- Scripting Adobe InDesign
- Interacting with the Unix Command Line
- Using Smile: The AppleScript Integrated Production Environment
- Tips and Techniques for Improving Your Scripts
- Creating Cocoa Applications with AppleScriptObjC
Synopsis
This third edition is updated to welcome a whole new generation of Mac users to AppleScript and how they can take control of their Mac. With more and more people choosing Macs, new demand and interest in Applescript is inevitable as people realize its power and usefulness. This new edition takes the new Apress Mac audience to Applescript.
AppleScript is easy to understand, it’s built into every Mac, and with this book you will learn how to unleash the full power of Applescript so that you can automate anything you do on your Mac!
This is the third edition of our critically-acclaimed AppleScript book, and it has been completely updated to include all of the new features of Leopard and Snow Leopard, the latest releases of Mac OS X. It begins by giving you a concise introduction to "The World of AppleScript so that you can get your bearings, and then moves directly to "How to AppleScript." You’ll learn how to handle variable, loops, and commands.