Sunday, August 7, 2011

Automate Publishing Workflows with AppleScript

Introduction to AppleScript

AppleScript is a powerful tool used in publishing and desiqn aqency workflows due to its interoperability between applications. It allows applications such as Adobe's II ustrator, InDesign and Photoshop, FileMaker Pro, QuarkXPress, iTunes and Apple's iWork applications to talk to each other, sharing and passing information between applications. AppleScript is an object-oriented language, meaning that scripts will target and control text or graphic objects on an InDesign layout, layers in a Photoshop image, or track in your iTunes library. It consists of two main elements: the AppleScript language (a base set of commands that work in all scriptable applications), and application scriptability. Each scriptable application has its own AppleScript dictionary of commands that are used to control them. Every Mac comes with AppleScript; no additional installation is required to start writing scripts. If you're running Snow Leopard, the AppleScript Editorapplication ives in the Utilities folder of your Mac's Applications folder. Scripts can be as simple as renaming tracks in iTunes, to full-blown publishing workflows. They can be saved as applications that can be double-clicked on a user's desktop. Scripts can be performed on a recurring schedule by being attached to an iCal appointment and can also run on UNIX scripts.




There are a number of good books available for learning AppleScript (see Resources at the end of the article) and this is the best method for learning the intricacies of the language. However, one of the best methods of starting out is to download scripts, reading their syntax to understand what they are doing throughout each stage of the script. While the AppleScript Editor installed on every Mac is a decent tool for writing scripts, Script Debugger from Late Night Software () has a wider range of tools for writing and troubleshooting scripts. It includes a debugger to step through each line of code one at a time so you can confirm that each part of the script is working correctly.

I discovered AppleScript when there was a need to automate a number of small processes for the publishing cepartment's design team. Designers were manually moving project files within a strict folder structure and mistakes were being made under pressure when working with tight deadlines. I wrote scripts to help with the team's processes that allowed the designers to focus on their designs rather than administration.

Create a Publishing Project Folder Structure

FileMaker Pro is used to track projects in the publishing department and generates a serialized project tracking number for each new project. The trackinq number is passed through the Finder where the project folder is created with a tracking number and project name. The oroject folder contains a hierarchy
for the project's lifespan. Sub-folders are created for Ideas, Illustrations, Images - Hi-Res Images, Lo-Res, Page -ayout - In Progress, Page Layout - Final, Proofs, Words - Draft and Words - Final. The designer simply creates the project record in FileMaker Pro, enters the project name, and clicks a button to create the project folder on the file server. The example screenshots show a simplified version of the script merely asking the user to enter a project name in the dialogue window and the resulting folderthat's created by the Finder.

Tracking Photoqraphy Shoots and Images with Photoshop, FileMaker Pro and AppleScript

FileMaker Pro is used to track photography shoots for the publishing department. FileMaker Pro's Instant Web Publishing (a quick method of publishing FileMaker databases to the web) is used as a web form on the organization's intranet for submitting photography requests. E-mail alerts are sent to the photography department and they approve requests, generating a photography shoot in FileMaker Pro with the date, time and location. The photographers upload their images to a Mac after each shoot, ranging from five images to hundreds. A numbering scheme is used to name the images for use in an online database hosted on the organization's web site. FileMaker Pro generates a record for each image along with the unique image number for the image's filename. An AppleScript is performed after the image records are generated that converts the images from the camera's RAW format to TIFF format for storing the images in the online database. The unique number is applied to the filename and a low resolution JPEG image is saved from the original file. The JPEG is imported into the FileMaker Pro database for previewing the images and writing captions. The AppleScript has saved hundreds of man-hours every year by automating a very manual process.

Catalogue Publishing with FileMaker Pro, Photoshop and InDesign

Catalogue publishing is a powerful workflow automation. Adobe Photoshop is used to automate colour correction, resizing of images and converting to TIFF file format using a combination of AppleScript and Photoshop's Actions. Converted images are imported into a FileMaker Pro product database where the product title, description, product code and cost are stored. Adobe InDesign is used for the catalogue's page layout out in a single document and AppleScript moves the product information and images to the specified pages in the catalogue. An output folder is created with the final InDesign layout and the catalogue's images ready to send to the printers. The whole process took tens of hours to manually lay out
the catalogue's pages and importing the images. AppleScript has reduced the process to minutes.

Resources

If you'd like to learn more about AppleScript, I recommended looking into the following:

Books:

AppleScript 1-2-3 by Sal Soghoian and Bill Cheeseman. An excellent Introduction to AppleScript written by Apple's AppleScript Product Manager.

Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X

by Hamish Sanderson and Hanaan Rosenthal. An in-depth guide to AppleScript and good reference book.

AppleScript: The Definitive Guide by Matt Neuberg. An advanced look at the AppleScript language.

Courses:

Automated Workflows


services/training/>

Scripting Events

TecSof:



Email Lists - excellent resources for help and participating in the AppleScript community. AppleScript-Users


applescript-users>

MACSCRPT



Software:

Ul Browser, PFiddlesoft

Control Mac OS X's user interface with AppleScript with this tool.

Script Debugger, Late Night Software

The best tool for writing and compiling AppleScripts.

Web sites:    .

AppleScript Language Guide - straight from the horse's mouth. The first place to start with learning the ApoleScript language.    I


mac/#documentation/AppleScript/Conceptual/

AppleScriptLangGuide/introduction/ASLR

intro.h:ml>

MacScripter

Tutorials for learning AppleScript and forums for interacting with other AppleScript developers.


1 comments:

you can buy here replica mobile phones best qualty and we send all countriesreplika telefonlar

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More