AppleScript resources
Interested in getting started with AppleScript -- or delving deeper to write more sophisticated scripts? These resources will help beginners learn the basics, and will help experienced scripters improve their knowledge.
Web
You can find more image scripts and explanation of code from AppleScript 1-2-3 posted on Apple's main AppleScript site.
Macscripter.net. A community focused specifically on AppleScript and other Apple automation tasks, Macscripter features a very helpful series of AppleScript tutorials as well as links to downloadable scripts and other resources. Members are helpful in answering questions; and I've found several solutions to scripting questions just by searching the forums.
Apple's site features a section on learning AppleScript, including sample code, essential subroutines and some text and video tutorials.
Mactopia -- from Microsoft of all places -- has a site specifically for those interested in scripting Office for the Mac, including a VBA to AppleScript migration guide.
Books
AppleScript 1-2-3: A self-paced guide to learning ApppleScript, by Sal Soghoian and Bill Cheeseman (Peachpit Press). At 800+ pages, this isn't meant to be read cover to cover; the first seven chapters are the instructions and the rest is reference. As a reference guide alone, this is a worthwhile book for anyone who wants to get even moderately serious about AppleScript.
AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Second Edition by Hanaan Rosenthal (Apress). A couple of years old now, but I saw plenty of still-useful info during a quick browse of this one, including a lot of details on calling shell scripts.
Free books or book excerpts
There are two AppleScript 1-2-3 chapters available free online at apple.com: The First Step and Image Events.
You can download the first chapter of AppleScript for Dummies, A Cannonball Dive into the Scripting Pool, from the "For Dummies" store (PDF format).
AppleScript for Absolute Starters is available as a free PDF download.
Add-ons
Satimage osax 3.4.0. This free download offers additional capabilities to native AppleScript, including regular expressions, finding and replacing literal search terms, and some mathematical functions like absolute values, sines, cosines and square roots. The Satimage osax 3.4.0 dictionary details all the new functionality.
Using AppleScript in other languages
appscript is a "high-level, user-friendly Apple event bridge that allows you to control scriptable Mac OS X applications from Python, Ruby and Objective-C. Appscript makes these languages serious alternatives to Apple's own AppleScript language for automating your Mac," according to its open-source project page.
I've tried only the Ruby version, which worked fine in my limited testing. There are several explainers online to help you get started installing and using rb-appscript, including articles at the Macdeveloper and O'Reilly Web sites.
Mac::AppleScript::Glue is a CPAN module that "allows you to write Perl code in object-oriented syntax to control Mac applications," by translating Perl to AppleScript. I haven't tried this one yet and it's fairly old (2002), but if you're comfortable in Perl and would like to add AppleScript capabilities to your code without learning the syntax, this is probably worth a try.
Have your own favorite scripts or resources? Let us know!
Getting the most out of AppleScript
Read more about Operating Systems in Computerworld's Operating Systems Topic Center.
- Google I/O 2013's Coolest Products and Services
- 10 Star Trek Technologies That are Almost Here
- 19 Generations of Computer Programmers
- 25 Must-Have Technologies for SMBs
- A walking tour: 33 questions to ask about your company's security
- 15 social media scams
- The 7 elements of a successful security awareness program
- IT Certification Study Tips
- Register for this Computerworld Insider Study Tip guide and gain access to hundreds of premium content articles, cheat sheets, product reviews and more.
- Software Asset Management: Ensuring Today's Assets Today's trends like BYOD and SaaS are new and exciting in terms of how they will help make our jobs more productive but...
- Software Asset Management: Getting Started Find out what steps to take that can lead your organization down the smooth path to SAM deployment.
- Gartner Report: How to Decide Whether SaaS ITSSM Tools Make Sense for Your Organization SaaS-based IT ITSSM tools appear to provide cost savings. However, failure to account for the resources to implement, integrate, operate and maintain the...
- Protection for Every Enterprise: How BlackBerry 10 Security Works Get an IT-level review of BlackBerry® 10 Security, addressing data leakage protection, certified encryption, containerization and much more.
- The ServiceNow Service Automation Platform During this webinar, you will discover how ServiceNow is enabling organizations to increase their competitive agility, user satisfaction and productivity, all while enhancing...
- Building a Business Case for Service Management & Automation As an IT infrastructure and operations (I&O) leader you understand the business and IT impact of service management and automation (SMA). All Operating Systems White Papers | Webcasts