Using Automator Actions

I really do enjoy using a Mac, I’m a complete convert after using Windows on my desktop for years. I not only feel as though I’m more productive now (no really!), but it’s also easier to get into a more ‘workflow’ orientated frame of mind than I used to have (although that could of course be equally due to me getting older and wiser!).
As an example I recently needed to resize a number of images I had, now usually I would do this by going into Photoshop and using the batch tool, I could have even created a photoshop droplet which would meant that I could repeat the process in future easily.

However, I thought that I would take the opportunity to use one of the tools available in OSX that I hadn’t really used before, namely Automator. In a nutshell Automator is a nice graphical tool that lets you automate repetitive tasks by using ‘action building blocks’ and hooking the inputs and outputs of various blocks together.

Automator

The left hand panel of Automator contains a list of applications and workflows that you currently have installed, with each application and workflow contains a number of actions that you can use. So the first thing I need to do is to be able to feed the list of files that I have currently got selected into my new Automator action. Fortunately this is really easy, all I need to do is to select the Finder application and drag the Get Selected Finder Items action into the stage.

Automator - Get Selected Finder Items

Now, here is the really cool part, we need to resize the images somehow. This again is really simple, Apple has an application called Preview which as the name suggests allows you to view many different file types such as PDF’s or Images. The Preview application includes a number of actions available to Automator, one of which is the Scale Images action. So all we need to do is to drag the Scale Images action onto the main stage below the Get Selected Finder Items action and the two actions will be linked together automatically. At this point you will be asked if you also want to add a copy action, this is because the Scale Images action will alter the original images, so if you want to leave the original images intact you can choose to also add the copy action. Since I don’t want to leave lots of copies of the files laying around, I chose not to add the copy action and to just perform the resize action on the original file.

Automator - Preview Resize
Believe or or not, we’re pretty much done now, the resize action has defaulted to using 480 pixels, however you can also choose to Show Action When Run from the options of the action which will allow you to change the size at runtime.

All I need to do now is to choose “File > Save As Plug-In” and save it as a Finder plug-in and I will be able to select it as a Finder action when I have selected an individual file or a group of files in Finder.

Automator - Running Resize Action

That’s it! I can now easily resize images with just a click of the mouse, I also (just as quickly) created another couple of automator actions, one to do a secure file deletion and another to open Terminal using the current working directory. I’m already thinking about converting some of the other repetitive tasks that I do into Automator actions.

This is why I really do love using a Mac these days, because I keep finding that the Operating System makes it increasingly easier to do the tasks that I need to do on a daily basis. If you have a Mac and you haven’t checked out Automator yet I can highly recommend it.

Posted in OSX

One response

Leave a Reply

Your email address will not be published. Required fields are marked *