Key Moments

Mac OS Automator: Doing things over and over is over.

Google TalksGoogle Talks
Education5 min read59 min video
Aug 22, 2012|12,178 views|52|7
Save to Pod
TL;DR

Automator allows Mac users to automate tasks without coding, but creating custom actions requires Xcode and understanding AppleScript or Cocoa.

Key Insights

1

Automator allows users to automate tasks by chaining together pre-built actions, enabling complex processes without traditional programming.

2

Workflows can be saved as various types of plugins, including Finder contextual menus, script menu items, folder actions, or even standalone applications.

3

Automator supports a wide range of data types, including files, URLs, text, images, audio, and video, facilitating cross-application workflows.

4

Users can extend Automator's functionality by creating custom actions using AppleScript, shell scripts, or Cocoa, leveraging Xcode for development.

5

Database publishing can be automated using Automator, either through tag container publishing or geometry generation, enabling scalable content creation.

6

To create custom Automator actions, developers can use Xcode, choosing between AppleScript, Cocoa, or shell script-based actions.

Automator: Programming without code

Sal Soghoian introduces Automator, a feature in Mac OS X Tiger designed to let users automate tasks without needing to write traditional code. By dragging and dropping actions, users can create workflows to perform repetitive tasks quickly and efficiently. Automator's scope is broad, covering various aspects of the OS, from file management and photo manipulation to web content retrieval and podcast creation. The core concept is to chain together 'actions,' each representing a step in a process, allowing information to flow from one action to the next. This empowers users to build custom tools for their specific needs, increasing productivity and reducing manual effort.

Renaming files sequentially

A simple yet illustrative example demonstrates Automator's file renaming capabilities. Users can select a batch of image files, often with camera-generated names, and apply a renaming workflow. Instead of manually renaming each file, Automator can sequentially rename them using a base name, such as 'vacation,' followed by a number. The 'Rename Finder Items' action offers options for adding text, dates, changing case, and creating sequential numbering. A key feature is Automator's prompt to copy files before renaming, ensuring data safety. This workflow can be customized to prompt the user for the base name each time it's run, making it a reusable tool accessible via the Finder's contextual menu.

Automating web image downloads and import

Automator can streamline the process of downloading images from web pages. For instance, a workflow can be created to extract URLs of large images linked from thumbnails on a webpage, download them to a specified folder, and then import them into applications like iPhoto. The 'Get Current Web Page from Safari' action captures the active page's URL, followed by 'Get Image URLs' to identify the linked images. These can then be downloaded and processed. To make this reusable, the workflow can be saved as a plugin for the script menu, allowing users to trigger the image download and import process from any webpage by simply selecting the custom menu item and providing an album name on the fly.

Creating standalone applications for sharing

For users who might not have Automator or need a more self-contained solution, workflows can be saved as standalone applications or 'droplets.' In the example of downloading photos for relatives, a workflow is saved as an application. When this application is double-clicked, it executes the entire workflow, downloading specified images and organizing them. This is particularly useful for sharing with less tech-savvy individuals, as they only need to double-click the provided application. However, the presenter cautions about the security implications of running unknown applications, advising users to only run them from trusted sources.

Integrating shell scripts for advanced operations

Automator allows for more advanced automation by incorporating shell scripts. A scenario is presented where a user needs to find specific image files within a directory (e.g., JPEGs starting with 'small wed') and archive them. This is achieved by using the 'Run Shell Script' action. Users can write custom shell commands (like `find`) directly within Automator. The script receives input from previous actions, processes it, and passes the results—in this case, a list of file paths—to subsequent actions. This workflow can then create a zip archive of the found images and attach it to a new email, demonstrating the power of combining Automator's drag-and-drop interface with the flexibility of scripting languages like Bash, Perl, or Python.

Automated database publishing with tag container

Automator can automate the creation of documents from databases, such as generating product catalogs. Using a program like Apple Pages and a FileMaker Pro database, Automator can retrieve records, sort them, and populate pre-designed templates. The 'tag container' publishing method is explained, where containers on a layout are 'tagged' with unique identifiers (like skew numbers) from the database. Automator then matches these tags to database records and populates the corresponding containers with text and images. This process significantly speeds up the creation of large documents, ensuring consistency and accuracy, and is a technique widely used in print publications like car traders and TV guides.

Text-to-audio conversion and podcast creation

The presentation also covers automating the creation of podcasts. A workflow can take plain text, such as the Gettysburg Address, convert it into an audio file using a text-to-speech engine (with options for different voices), compress it into an audio format like MPEG AAC, and then optionally generate an XML podcast feed. This allows users to quickly turn written content into audio for distribution. The workflow concludes by opening the generated audio file in QuickTime Player for playback. This showcases Automator's ability to handle multimedia content and integrate with various system services.

Creating custom Automator actions with Xcode

For users who need functionality not covered by existing actions, Automator supports the creation of custom actions. This involves using Xcode, Apple's integrated development environment. Developers can create new actions based on AppleScript, Cocoa (for Objective-C, C++, Java, etc.), or shell scripts. The process involves defining the user interface for the action in Interface Builder and writing the underlying code. These custom actions can then be integrated into Automator workflows. Resources like automator.us and automatoractions.com are recommended for finding pre-made actions and learning how to develop custom ones.

Automator Quick Start Guide

Practical takeaways from this episode

Do This

Use Automator to automate repetitive tasks like renaming files, downloading images, or formatting data.
Drag and drop actions into the workflow area to build your automation sequence.
Utilize the search field to quickly find available actions.
Save workflows as plugins for contextual menus, folder actions, script menus, or standalone applications.
Customize workflows by adjusting action options and using the 'Show Action When Run' feature for user input.
Leverage built-in support for SQL and shell scripting for more advanced automation.
Explore developer resources to create your own custom Automator actions using AppleScript, Cocoa, or shell scripts.
Refer to the Automator.us website for tutorials, examples, and community resources.

Avoid This

Don't try to program complex tasks without understanding the basic workflow structure.
Avoid running unsolicited applications received via email without verifying their source and function.
Do not expect every possible action to be built-in; complex tasks may require custom scripting or actions.
Do not overlook the potential for mistakes when sharing self-running applications with less tech-savvy users.

Common Questions

Automator is a workflow automation tool for macOS that allows users to create automated tasks by dragging and dropping actions. It enables programming without extensive coding knowledge, simplifying repetitive computer operations.

Topics

Mentioned in this video

Software & Apps
AppleScript

A scripting language for macOS, discussed as a precursor and companion to Automator, with San being the product manager for it.

iPhoto

Apple's photo management software, used in examples for importing photos and potentially filtering them by rating.

Aperture

Apple's professional photo management software, mentioned as an alternative to iPhoto that has built-in Automator actions for searching by rating.

Mac OS X

The operating system for which Automator is a feature. Demonstrations and use cases are shown on this OS.

Interface Builder

A tool used within Xcode for designing the user interface (UI) of applications and Automator actions.

Safari

Apple's web browser, used in examples to demonstrate Automator's ability to interact with web pages, retrieve linked images, and download them.

automator.us

A website that provides an overview, tutorials, downloads, and developer resources for Automator.

Finder

The file manager for macOS, which is frequently used in conjunction with Automator workflows, particularly for file operations and contextual menus.

Xcode

Apple's integrated development environment (IDE) used for creating software on macOS. It is shown as the tool for developing custom Automator actions.

Pages

Apple's word processing software, used in the database publishing example to create a product catalog.

Automator

A workflow automation tool for macOS that allows users to create automated tasks through a drag-and-drop interface. It is the primary subject of the video.

FileMaker Pro

A database software used in an example to demonstrate automated database publishing with Automator.

QuickTime

Media player and editor used in the example of converting text to audio, compressing it, and opening the resulting file.

More from GoogleTalksArchive

View all 92 summaries

Ask anything from this episode.

Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.

Get Started Free