The ultimate role of a calculator is mechanization . Even when you ’re doing something as simple as editing text in a word processor , you ’re automating action that would be rottenly tedious if you had to do them yourself , one at a time . ( If you do n’t conceive me , trade your computer in for a typewriter . thrash the pusher reappearance at the end of every line ; remember to add extra space before every paragraph ; get all the spelling right ; make a mistake and retype the whole page — no thanks ! )

Nevertheless , your computer does n’t know in advance everything you will want to do , and there are times when you probably find yourself performing the same actions over and over again . Or perhaps there are things you do n’t do , because , although you know how youcoulddo them , the prospect would be too tedious and time - consuming . This is a uncollectible nation of affairs . It mean that the roles have been reversed : you , the human being , are being automatise , alternatively of the computer .

Since the dawn of computing machine time , the traditional way to solve this problem has been to compose a new computer program that performs the repetitious or deadening actions . But save a brand name young program should n’t be necessary when applications you already have on your computer can perform the want single steps . The job is to get those applications to perform those steps themselves , rather than your have to do it one step at a metre . This is why Apple created AppleScript , which lets you tack together a episode of actions that your existing applications can execute , and then set that sequence go whenever you like .

Automator workflow document

However , AppleScript is a programing speech , and many users have an aversion to programming linguistic process . So Apple introduced , in Tiger , a unexampled mechanisation proficiency — an applications programme called Automator , which rent you , the user , assemble a series of steps ( calledactions ) into a single sequence ( called aworkflow ) without doing any programing at all . A workflow can be economize as a document , so once you ’ve created a workflow , you could open it again later and perform the same sequence of step , in a single move .

Tiger comes with a number of Automator actions ; these action at law are stored in /System / Library / Automator . You may also expect that many third - party action will be written as Tiger matures ; as you acquire such natural action , you ’ll store them in /Library / Automator or in your own substance abuser ~/Library / Automator .

It is also possible for a third - party software to be write in such a agency as to let in its own actions ; in a case like that , its activity will be available in Automator , but you wo n’t see them as individual files . For example , when you update to the latest version ofBBEdit , about 20 new action for cook school text will as if by magic appear in Automator .

Simple Automaker workflow

Extra for experts

An lotion that responds to AppleScript ( that is , ascriptableapplication ) is a good nominee to be the mark of an Automator action , and behind the scenes , the centre of an Automator action that targets a scriptable program typically is an AppleScript script . So , when you construct a workflow in Automator , you may well be stringing together a serial of AppleScript scripts — except that you do n’t need to eff AppleScript ; the scripts are already compose , and you never see them .

Make an Automator workflow

Using the actions included with Tiger , you’re able to commence stringing actions together to shape work flow right now , in ways that will allow you to do things you may previously have thought out of the question . Automator workflows may well become an important part of your customization of Tiger .

To illustrate the process of construct an Automator work flow , let ’s gravel ourselves a undertaking , for purpose of illustration . Our example will be extremely simple . I ’m not seek to learn you all about Automator ; I just require to show it to you so that you ’ll understand the basics and wo n’t be afraid to experiment on your own .

Often , I ’ve seen people say this on an net newsgroup : “ I have a brochure full of files , and I want to list the names of those files in a Bible processor . How do I do it ? ” Now , you’re able to solve this problem in a routine of ways . you may use Terminal — but many people do n’t like Terminal , or are afraid of Unix commands . you could use Bare Bones Software ’s freeware TextWrangler — but perhaps you do n’t realize that . Anyhow , the veridical motion is : How can you solve this problem for yourself ?

This is the sort of post where you ought to turn to Automator and see if the applications and action on your computing machine can help you perform the desire labor . Let ’s do it !

Step 1 : Start up Automator . ( It ’s in the Applications folder . ) A new work flow text file opens .

Let ’s look at what we ’re seeing . On the left are listed all the Automator actions ( the Action column ) . The inclination can be filtered in two way : you’re able to pick out one or more app in the Applications list ( in the Library column ) , to show only the actions that lend oneself to them , and you’re able to typecast in the Search theater at the top of the windowpane . On the right is a large blank area where you ’ll drag each action you want to utilise , order them to form a top - to - bottom chronological succession .

Step 2 : Think about the problem . How does it go ? “ I have a leaflet … ” So your succession ’s first step is to specify the folder . Click Applications in the Library column ( because we want to search all actions ) , and typecast

tone 3 : The first found military action is Get Selected Finder Items . get across it to show more about it in the dose at the bottom of the left side . The description say : “ This action gets the choose items and passes them to the following natural action . ”

Step 4 : This sounds promising , but it would be more convenient not to have to get going by selecting the desired leaflet ; it would be honest if a dialog would appear , asking what folder we want to employ . Wait — the third action in the lean is Ask for Finder Items . Click it and read its description : “ This action lets the exploiter opt Finder items in a dialog when the workflow is break away . ” Perfect ! Drag Ask for Finder Items into the chief area on the right hand ( as establish in the screenshot above ) .

footstep 5 : As with many actions , this one has certain modifiable characteristics . ( The action at law can be display by name only or with all its characteristic display ; to toggle between those modes of display , click the trigon at the left of the action ’s deed of conveyance . ) It bend out that Ask for Finder Items has a Type pop - up fare : we can throttle the types of point to single file , folder , or both . Excellent ! We live we desire to select a folder to function on , so commute the Type pop - up menu to Folders . Also , we get to find out the prompt text that will show in the clear dialogue ; instead of “ select a Finder Item : ” , enter

Step 6 : Part of the fun of working with Automator is that you’re able to test your workflow right by , even before it ’s polish off . flick the Run button at the top right of the windowpane .

A duologue appears and asks you to pick a booklet ! ( tick Cancel or hunky-dory to dismiss it . ) Our work flow is working . Of course , so far it doesn’tdoanything with the opt leaflet .

Step 7 : Let ’s pay back that . fall in a folder , we take to get all the single file inside it . Look back at the listing of actions . Hmmm … Get Folder Contents wait promise ; click it and read the description . “ This legal action gets the items from inside the specified leaflet . ” Sounds good !

Step 8 : Drag Get Folder content into the main area , after ( below ) Ask for Finder Items .

Look at what materialize . The two actions join up in a specific way . An activity can have input ( data that course into it ) and output signal ( datum that it farm ) . For one action to come through another , you usually want the data produce by the first to be fed to the second . The join between the military action in Workflow shows this happening . require for Finder Items produces files and booklet — the file and folders choose in the dialog by the substance abuser . ( In this cause , it will produce just one item — a folder — because that ’s what you ’ll actually choose in the dialogue . ) Those files and booklet are then fed to Get Folder Contents . This act because the turnout of the first dance step is the same type of thing as the input to the 2d footprint — file and folders .

backsheesh : This approach path to programming is called adataflowdiagram ; each dance step produces data which it pass by to the next step , and the steps are represent visually as feeding one step ’s yield into the next step ’s stimulant . Unix programmer are conversant with the same construct through the notion of apipe .

dance step 9 : The 2nd step now gets the content of your chosen leaflet , but it does n’t display them . To help with this problem , Automator supplies a particular action at law : catch Results . Use the Search field to find it and drag it into the succession at the end .

dance step 10 : Now feed the work flow again . This time , Automator displays the contents of the chosen brochure as a series of Unix path , inside Automator itself . Having proved to yourself that that the workflow is working , you’re able to click the disco biscuit at the top right of View Results to transfer it from the sequence if you want ; but there ’s no harm in leaving it there , since its end product is the same as its input — it will lapse along the folder contents , unaltered .

gradation 11 : Next , we want to capture the Unix path bring on by the previous whole tone , in a textbook written document . character

Tip : This ability of Automator to convert one type of data into another mechanically is important , because it means you do n’t have to worry very much about the character of data point being handed from one step to the next . If Automator ca n’t convert one action ’s outturn to the next action ’s comment , it will reject to connect them , the information types will seem in red , and you ’ll know that your chronological succession is n’t run to work .

footfall 12 : lead the work flow . ( The screenshot below evidence the nail workflow . ) It works ! You choose a folder , and a TextEdit document appears , containing the pathnames of the files and folders within it .

That ’s all there is to play with Automator . Every workflow is like this , a straightforward series of action one after the other . There ’s no complicated looping or decision - devising .

To learn more , study the example workflows that are included ( look under Example Workflows in the Library pillar ) , and see over the military action available to you ( everything in the Action column ) . Think of workflows you ’d like to create . And , as you use Tiger , call for yourself whether an activity you ’re performing or would wish to do could be automated by convey it as a work flow .

Extra for Experts

If you ’re an AppleScript programmer ( or you just play one on TV ) , an Automator activity is a terrific way to distribute a handwriting to other users , because it gives those users a trivial interface for modifying the script ’s behavior , and because it allow them incorporate the hand into a larger workflow . To get started writing your own Automator actions , see my on-line article atMacDevCenter.com .

[ Matt Neuburg is a TidBits contributing editor and the source of a variety of books about Mac software ; his latest isTake Control of Customizing Tiger(TidBits Electronic Publishing , 2005 ) . ]