MacTech Article > Migrating AppleScript Studio Apps to AppleScriptObjC (Cocoa-AppleScript)

For years, AppleScript Studio provided scripters with a framework, through Xcode and Interface Builder, for implementing Cocoa interfaces in AppleScript-based apps. When it comes to AppleScript, end users are often accustomed to faceless apps that simply run when launched and quit when finished, with minimal feedback along the way. AppleScript Studio gave developers the power to implement feature-rich and user-friendly interfaces, which allowed users to configure script behavior, displayed progress during processing, and gave scripts the look and feel of virtually any other OS X app.

In August of 2009, Apple released Snow Leopard (OS X 10.6). At the same time, AppleScript Studio was deprecated and its official replacement, AppleScriptObjC, also known as Cocoa-AppleScript, was announced. AppleScriptObjC provides all of the benefits of AppleScript Studio, but with numerous additional benefits such as the ability to integrate scripts with any Cocoa framework in OS X.

Today, in Mountain Lion (OS X 10.8), Xcode no longer supports AppleScript Studio. Xcode includes project templates for creating AppleScriptObjC apps, but all references to AppleScript Studio are long gone. For long-time AppleScript Studio developers, this raises some core questions about supporting and migrating existing apps.

[Read the full article in MacTech magazine's March 2013 issue, available in print and in the MacTech iPad Newsstand app]


Peachpit Article > Building a Simple Image Processor with AppleScriptObjC (Cocoa-AppleScript)

My earlier article "Building a Basic AppleScriptObjC (Cocoa-AppleScript) Application with Xcode" explained how AppleScriptObjC and Xcode can be used to build robust interface-based applications for the Mac. While that article demonstrated this principle through the creation of a very simple Hello World application, the techniques provided can serve as the basis for building more advanced applications, for real-world scenarios. In this article, we'll build on those techniques to create a functional application that can perform some basic image manipulations, including flipping, rotating, and scaling a chosen image.

[Read more on the]

MacTech Article > Introduction to AppleScriptObjC (Cocoa-AppleScript)

AppleScriptObjC, also known as Cocoa-AppleScript, is a framework in OS X. It was initially released with OS X 10.6, and serves as the official replacement for AppleScript Studio, which Apple deprecated at the time. AppleScriptObjC is used by scripters to write rich, fully featured Cocoa apps in AppleScript. Think of AppleScriptObjC as the “Pro” version of AppleScript. For building simple scripts, AppleScript alone works great. For building advanced and complex scripts, perhaps with advanced interfaces, you want to think about moving to AppleScriptObjC.

If you’re a hardcore AppleScript developer or regular MacTech reader, then you’ve probably heard of AppleScriptObjC. You may have worked your way through a tutorial, and maybe even created a very simple app. If you haven’t used AppleScriptObjC yet, then you may have used Xcode in the past to develop AppleScript Studio apps. This month’s column starts with the basics. It provides a very introductory look at AppleScriptObjC. While we won’t build an actual app just yet, we’ll explore some of AppleScriptObjC’s core concepts and syntax.

[Read the full article in MacTech magazine's Fall 2012 Special issue, available in print and in the MacTech iPad Newsstand app]

Peachpit Article > Building a Basic AppleScriptObjC (Cocoa-AppleScript) Application with Xcode

In OS X Mountain Lion, AppleScript continues to be a powerhouse tool for controlling applications on the Mac. Whether you need to automate the creation of a few folders in the Finder, or generate a several-hundred-page product catalog in Adobe InDesign, AppleScript is waiting to lend a hand. Despite AppleScript's learning curve, Mac users everywhere are using it on a daily basis, and it saves time and money that might otherwise be wasted.

 AppleScripts aren't known for having slick interfaces. Perhaps most often, these scripts are written as simple applications, using the AppleScript Editor (found in/Applications/Utilities). When you double-click the application, it launches, performs some series of hidden tasks, and then quits. Developing script applications that work like this is quick and easy if you have the know-how, but if you're planning to distribute your script to other people, this format isn't always ideal. For one thing, aside from displaying simple dialog messages, you have no real way to let users know what your script is doing. Furthermore, unless users are AppleScript-savvy, there's no way for them to adjust the behavior of your script.

AppleScriptObjC (also called Cocoa-AppleScript) is an advanced method of developing AppleScript-based native Cocoa applications. With AppleScriptObjC, you can develop rich user interfaces and interact with them directly from your scripts. [Read more on the]