This article will show you how to create a workflow, fill it with tasks and then execute it. Let's get started.

The first thing that you see after launching Automator is a start page. This document shows latest news and common actions. Let's start a new workflow by pressing "Create Blank Workflow" link on a start page, "New Workflow" button or Ctrl+N.

Note: One can say that the first step in something new should be a variation of a 'Hello World!' thing. Of course I could make a tutorial that illustrates 'Hello-World-Workflow', but let's be more creative to make our first steps in Automator interesting.

I believe that logical grouping of the tasks is a good practice, so the next step will be adding a Group Task. For that press the "Add Task" button or Ctrl+Ins, then select Group in the list:

Select Task

In a edit window add some description to this task. For example, I typed 'Getting Started' there. Press OK, and see that Group Task was added to the workflow.

Task Added

You can edit tasks by double-clicking them, or by selecting "Edit Task" command from main menu, context menu or toolbar.

So, now we have a group, but it's definitely empty. Let's fill it, shall we? Click at Group Task to select it and press "Add Dependent Task". Choose Script Task in an already familiar list.

Note: If you are not a developer, then you probably won't need or even understand the purpose of a Script Task. But for now, it is one of not too many tasks that return a value, so I'll use it anyway.

After filling the details of a Script Task, it should look like this:

Script Task

You can check it for errors (of course, there are none) and then click OK. Now we have a task that should calculate an expression (2+2 in our case). But if we will press "Run Workflow" or F5, we won't see, if our script works correctly.

After First Run

Add an Info Window Task as a dependency of Script Task, and fill it like this:

Info Window Task

Notice the %Result%, it is an Automator system variable that contains last execution result. Every task that returns something will replace its value. You can use this variable anywhere that you like except scripts. Let's check how it works. Reset the workflow to its initial state by pressing "Reset Workflow" or Ctrl+F2 and run it again. Voila!

It Works!

If you uncheck a task, it will be treated as disabled and neither it, nor its dependencies will be executed.

I believe that now you understand the basics of Automator workflows, how to create, manage and execute them, how to add new tasks and how to gain access to the result of a parent task.

Last edited May 16, 2011 at 7:09 PM by VictorLapin, version 6

Comments

No comments yet.