Automate an installation process - with Automator
Previously, we looked at how to install custom QuickLook plugins, so we can preview more kinds of file types using this awesome feature of Mac OS X Leopard.
Today we will learn how to automate this process of copying a file into a certain location. So we only need to click the file, select the action and it’s installed.
The application we will use for this purpose is called Automator and it comes with Mac OS X.

It’s aimed at eliminating repetitive tasks, such as copying files in the same directory. This may sound a bit geeky, but we take it step by step. It’ll be great.
Previously we installed additional QuickLook plugins. That involved copying a file into a directory. This is something, what was made to be automated.
Getting another QuickLook plugin
For this tutorial we will install another QuickLook plugin, one that allows us to play .flv (flash video) files using QuickLook.
The website of the author is in Japanese (I believe) so this is the direct link to the QuickLook plugin file.
Once you downloaded and extracted the .zip file (by clicking it in the Downloads stack) open the folder.
Create a workflow (i.e. automated action)
First, locate the QuickLook plugin file (in this case it’s named flv.qlgenerator).
Control-click it and select More > Automator > Create Workflow to start up Automator.

Automator opens up. Let’s go through the interface really briefly.
The basics of the Automator interface

Actions
This area shows all available actions - you can move and copy items in Finder, adjust size of pictures, control iTunes and much more - explore for yourself. Use the description to find out more about a selected action.
Workflow area
By dragging actions into the workflow area you construct a workflow. The items in the workflow are processed after each other.
Before we start
This is how it will work in the end (after we created the workflow):
1) Pick a file in Finder
2) Select the Automator workflow
3) Make the workflow copy the selected file into a certain directory (ie the QuickLook plugins folder)
Creating the workflow
As you see, right now the only item in the current workflow points to a specific file (in our case the Flash video QuickLook plugin). We, however, want something different.
We want to recognize the Automator workflow what’s currently selected in Finder. As it is now, the workflow points to one specific item - this is wrong, since it would copy this file over and over again into the QuickLook folder, no matter what we select in Finder.
1) So, we delete this item from the workflow, by clicking the cross in its upper right corner.

2) Now from the Library pick Files & Folders and subsequently the action Get Selected Finder Items.

Hint: Click in the field, where it reads Name (above the actions list) to search for an item.
3) Drag this action to the workflow area. This makes the workflow recognize, what’s currently selected in Finder.
We need to do this, since we can not predict now, what name a certain file will have. So we create a workflow that takes the file, currently selected in Finder at the time the workflow will be running.
4) Now let’s add the action to copy the file. Again, from the Files & Folder library item, pick Copy Finder Items and drag it to the workflow area. Make sure it’s inserted after the existing item.
5) In the Copy Finder Items action, for the item To, select Other… instead of Desktop.

6) An opening dialog appears. Go to Macintosh HD > Library > QuickLook and click open.
Choose > your home directory > Library > QuickLook if you want to install the plugin for the current user only.
7) Note, the To field in the Copy Finder Items changed to QuickLook.

8) Done. From the File menu, select Save as Plugin…

Give it a descriptive name, maybe Install QuickLook plugin and save it as plugin for Finder.
9) Now, where is it? Go back to the QuickLook plugin file, located in a folder in your Downloads stack. Control-click it and select More > Automator.
There it is - Install QuickLook plugin - our first Automator plugin for Finder.

10) Select it to run the workflow, we just created.
11) As the workflow runs, you see its current status in the menu bar.

12) To see if it worked correctly, go to the folder we copied the QuickLook plugin to, Macintosh HD > Library > QuickLook
(or > your home folder > Library > QuickLook) and see if it’s there.
If you followed the steps it’s quite likely that the file is there.
13) Don’t forget to restart Finder, to make the QuickLook plugin become active, as mentioned in the original post on installing a QuickLook plugin.
Congratulations, you just used Automator to created a Finder plugin. So, from now on, when you get a QuickLook plugin, simply select the file, pick More > Automator and let Automator install the plugin for you.
No more directory digging. Nice!
Liked this post?
We hope you liked this post and it helped you to become a better Mac user. Good news: You can help us in exchange.
Donate any amount, to keep Mac Kindergarten up and running. Everything helps and is greatly appreciated.
Email This Post
Tags: add-on, Automator, flv, installing, menu bar, QuickLook, video
Related posts: