by Derek—2005.08.24 @ 2140
My rating: 3 out of 5
Ever since getting OS X 10.4 (Tiger), I've been excited at the possibilities within Automator--Apple's easy-to-use interface to Applescript. So far, I've made some simple "workflows" like taking text from the clipboard and making an audio file, a sequential file naming tool, and a screenshot-to-web tool, but my attempts at making something more complex and useful have failed dismally.
In making complex workflows, I often push outside the boundaries of what Automator was designed for, and often crash the application in the process. One of the first workflows I wanted to create, and one I haven't perfected yet, is to take selected images from iPhoto and make three different copies: one scaled to 600 pixels; one scaled to 400 pixels; and one scaled to 100 pixels (a "thumbnail image"). These three versions are the building block to any web-based photo gallery. My ambition was actually to go further: I wanted to then take these images and plug them into a template, using the wonderful BBEdit's grep tools.
--
Automator likes a workflow to flow linearly. But even then, workflow actions often are ambiguous at what was coming in or going out of them. My ambitous project was cut short because I ran into these problems:
Now, perhaps these limitations can be overcome by using using Automator's Run Applescript or Run Shell Script actions, but I wanted to create workflow using only the pre-built, drag-and-drop actions provided. First thing to drop was my search-and-replace-template-idea through BBEdit. Actually, I dropped the whole idea of doing anything remotely close to using a template. I would try to just get an image formatted into three different sizes.
My first thought was to take the images from iPhoto and copy them into a new folder on the desktop. The images would then be resized. Duplicating the image proved impossible. Automator only provides an action to copy them image and put it in a standard space, like the Desktop. This becomes a little bit of a challenge when you try to access these images again to perform other tasks on them, or to find them.
To overcome the file duplication challenge, I decided to create three separate workflows, one for each batch of images I wanted. The first workflow pulled the selected images out of iPhoto, saved them into a folder named '600' and resized them. The next workflow did much the same thing, only instead of grabbing the images again out of iPhoto, it would look for the '600' folder, taking the images inside and processing them; a new folder named '400' was also created. The thumbnails were created the same way with a folder entitled '100'. Each of these workflows were tied together in a single workflow with some final "clean up" actions to get rid of the '600', '400', and '100' folders and images. A final folder would then be created with all three image sizes together.
By using specific folder names, I was hoping Automator would just look for folders based on a relative position in the Finder. This turned out to be incorrect. The full-path is stored in Automator, so once these folders were removed, Automator got lost looking for them.
The first time this multi-workflow was run, it seemed to work, but after removing the old image folders, the workflow failed. When I ran the workflows individually--one right after the other--they worked fine, but not together. It was very strange since Automator lets you run workflows in sequence.
The end result was to create four different workflows: one for each image size, and then a "clean up" workflow. It is not optimal by any sense, but I guess it does save a little time compared to other methods.
Thanks for signing in, . Now you can comment. (sign out)
(If you haven’t left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)