Automator is incredible convenient program from Mac OS X, which allows you to automate some routine and everyday operations. Unfortunately, most new Mac users They don’t even know about the existence of this tool. Therefore, today I will try to correct this and, with the help of clear examples, show the basic principles of creating mini-programs, which are called “processes” (workflow).

Batch renaming images

We will begin, perhaps, with a fairly simple task of group renaming images according to a certain mask containing the file name, its number and the current date. If there are several such files, you can rename them manually, but if there are a large number of files, I recommend using the services of Automator.

To launch the utility, you just need to either find its icon at the top of the Applications directory, or use your favorite launcher for launching applications/system Spotlight. And after a few seconds, the application window will appear in front of us, as well as a list of available templates:

  • A "Process" is the simplest sequence of actions that can be started directly from Automator.
  • The "program" is a self-contained process and can be saved as a normal Mac apps OS X with *.app extension.
  • A "service" is a process that is context specific and can be used across the entire system or individual applications.
  • The “folder action” is launched only for the folder specified in it and is initialized by the objects added to it.
  • "Print plugins" are used to extend the capabilities of the print dialog.
  • iCal Reminders are processes that are triggered by events added to iCal.
  • Finally, the “Image Capture Plugin” can be used in the corresponding application to process photos uploaded from the camera.

In our case, select “Folder Action” - and a window will appear in front of us, divided into 2 areas. On the left half is the Library (a list of available actions and variables), and on the right is the workflow window into which you can drag and drop items from the Library.

The option located at the top of the process window (right below the toolbar) requires you to select a folder. It is for this that our actions will be performed:

Everything we may need to solve a problem is located in the “Files and Folders” category. First, you need to find and drag an action called “Rename Finder Items” into the workflow window. Because Automator changes their names, we'll be prompted to automatically add another action that allows us to save the original files to a different folder (I chose not to save copies, but that doesn't mean you have to do the same).

Now in the very first drop-down list of our action, you need to select the “Make consistent” item and configure the format of the new name as you wish. This is quite easy to do, since there is an example at the bottom of the action.

To add the current date to the file names, you need to drag the Rename Finder Items action into the workflow window again. Only this time, instead of “Make sequential”, select the “Add date or time” list item (more precisely, it is selected automatically) and set the parameters as you wish:

Bulk image resizing

Let's complicate the task. Let's say we have a large number of images (photos) that need to be reduced. To solve this problem, we need to select the “Program” template.

However, before rushing to solve the problem head-on, I suggest drawing up a sequence of necessary actions. For example, first we should ask the user to select the photos whose size we want to resize. In addition, it is advisable to work not with the original files, but with their copies, so that you can always try new settings for our process. And we will copy the reduced images to a separate directory.

Now we can move on to creating our mini-program. First, you need to find and drag the Query Finder Items action into the workflow window under the Files and Folders category (or via the search bar). There you can specify the window title text, the starting folder and the data type. Don't forget to check the multiple selection checkbox.

To work with file copies, I suggest searching the Library for the “Copy Finder Objects” action, specifying the destination directory. The next action is in the "Photo" category and is called "Resize Image". In the settings you can specify the size of the resulting image in pixels or percentages.

By the way, in the bottom panel of each action there are three tabs: Results, Parameters and Description. Therefore, if you want Automator to prompt you every time to specify required size images when performing this action, select the “Show action during execution” checkbox in the Options tab (if desired, using this option you can extend the previous process to set a specific name for the files to be renamed).

If you notice, a triangular arrow comes out of each action, which represents the result of its work. These results are then used as input parameters in the next action.

And one more trick: by selecting the “Show action during execution” checkbox, the “Show only selected objects” option will become active. This way you will not be able to display the entire window with the action, but only some elements. For example, a field to indicate the required size.

And to complete the process, we need to transfer the thumbnail image to a new directory. For this we will need the action “ New folder" from the "Files and Folders" category.

The saved program will behave exactly like any other application on the system.

Opening certain web pages when launching the browser

Almost every day I launch Safari and start working with the same web pages. So why not create an application that will do this automatically?

We will need the "Application" template and two actions located in the "Internet" category:

  • “Get selected URLs”, in the settings of which we indicate our favorite web pages;
  • and the “Display Web Pages” action to open them in the default browser.

Extract text from PDF

This is a fairly simple but handy script for Automator that can sometimes save time. It will allow you to extract text from a PDF document (of course, such a document should contain text, not scanned images) and save it in separate file with or without formatting.

To solve the problem, we need only one action with the same name, “Extract PDF text”, located in the “PDF files” category. Drag it into the workflow window and configure the settings as you wish:

Note that we didn't specify a "Query Finder Items" action in this process, so once launched, we can drag any PDF file we want to process directly onto our app's Dock icon. This file will serve as an input parameter for the process.

Save the contents of the clipboard to text file

We continue to get acquainted with the different Automator templates, and in this process I propose to create a service that will save the contents of the clipboard to a text file that we specify. The required template is called “Service”. She will not teach any initial data, but will “act according to the situation.” Therefore, it will not have input data, which is what needs to be indicated in the drop-down list above the workflow window.

We need to give our service a human name so that we can easily find it in the “Services” menu of any application...

...and assign it, if necessary, a keyboard shortcut in the System Settings application.

And if you replace the “New Text File” action with “Text to Audio File”, then as a result of the process you will get an audio track with the contents of the clipboard, recorded using the text-to-speech function built into Mac OS X.

In general, this function was designed specifically for people with disabilities, but if desired, it can also be used for entertainment purposes.

Easy automatic backup

We continue to complicate the task, and now I propose to create simple system backup that will be triggered when a certain event occurs in iCal. To do this, we will use its ability to serve as an event reminder to launch a specific application or file.

In Automator, select a new template type - “iCal Reminder”, and then drag three actions from the “Files and Folders” category into the workflow window:

  • “Get specified Finder objects” (select the desired folder for backup using the Add button).
  • “Get contents of folders” with the “Repeat for each subfolder found” option selected.
  • And “Copy Finder Objects” (this requires you to specify a destination directory and allows you to replace existing files).

As soon as you save the process, iCal will launch and an event with the name of your process will automatically be added for the near future. You can change this event at your discretion, and also create a completely new, independent event, indicating the need to run our program in the reminder section:

Quit all applications

Sometimes you need to complete everything running applications, which interfere with work or have taken up almost all the free resources of the computer. In this case, you can use a special utility like Blitz, one of the tips for concentrating attention in Mac OS X, or start working “from scratch” by closing all applications in one fell swoop.

Such a workflow will require only one action, formatted as a program. And this action is called similarly - “End all programs” (it is located in the “Utility programs” category). You can also add some applications to exceptions. In “difficult moments”, it’s enough to launch our mini-application, wait a while and again enjoy the performance of the Mac.

That's all for today! I hope that this article will help you not only understand the wonderful and useful Automator tool, but also greatly simplify some routine operations. Don’t be afraid to experiment, because if you wish, you can take any of the examples discussed above as a basis and change them at your discretion.

In my first post on this resource I would like to describe simplest example creating an informer using the incredibly convenient Automator utility that comes bundled with Mac Os X.

Just the other day, with a radical drop in the street temperature in Moscow, I suddenly had a task: visually monitor the temperature in the server room (or rather in the rack), at a certain interval, because... The air conditioner serving the room refused to work at T< -15 ºC.


To begin with, I’ll immediately explain that the issue of monitoring the temperature of the server room, the rack, each server in it, as well as a couple of hundred other parameters, was comprehensively resolved by me by installing the Zabbix monitoring system. And I must say, she does an excellent job of this, not only scrupulously collecting all this data and storing logs of all changes in these parameters, but also providing information if control or critical points (triggers) are reached. However, it is not always possible to receive mail messages or SMS can be convenient, especially of the same type, as in my case, containing a specific value that changes slightly over time - in this case, the room temperature. And so I decided to visualize this information for myself, fortunately the process takes 5 minutes and a dozen clicks, and in the end we get conveniently appearing notifications with the desired parameter, and the interval of their appearance is customizable, and the history is conveniently stored in the message lists of the center Mac notifications Os X.

I chose the Ambient Sensor of one of the rack servers as the source of information. This is a Supermicro server equipped with an IPMI interface.
First, open the program interface:


We choose to create a new process, and then, in the “Actions” section of the library, select the utility subsection - in fact, we will only use them.

Actually, the program interface is quite simple; on the left we have a library of actions or variables that we can use when creating step-by-step processes, and on the right is the process body formation field, into which the actions and variables we need are dragged from the library in the chronological order in which they should occur within the framework of the generated process.


So, the main request, as I indicated earlier, will return to us the temperature of one of the server sensors located in the rack. The command that returns it in my case looks like this:

Ipmitool -H xxx.xxx.xxx.xxx -U LOGIN -P PASSOWRD sensor get "Sensor Name" |grep "Sensor Reading" |grep -o ""

Where xxx.xxx.xxx.xxx is the IP address of the IPMI interface
LOGIN and PASSWORD are the login and password for accessing the interface.
Sensor Name is the name of the sensor from which data is supposed to be read. In my case it was "System Temp".
Utility grep in this context used to return an easy-to-read two-digit digital value for the sensor temperature.

So that the process runs in the shell this command, drag the corresponding action from the library to the process field:

Please note - in the upper right corner there is a checkbox that allows you to either place the result of the script execution in stdin, or return it as an argument for further actions. Since we plan to use the result in the future, we choose to return “as an argument”.
And since we want to use the obtained value in other operations, it makes sense to create a variable to which the value obtained above will be assigned; to do this, select the “Set variable value” action:

By clicking on the “new variable” field, you can give it an easy-to-read name, for example “Temperatrois”. Notice also that there are arrows between the two actions indicating the direction of the sequence of actions.

Well, the rest is quite simple, now we need to display a notification in the notification panel with the value of the new variable. We drag the corresponding action from the library, and drag our variable from the bottom panel with a list of defined variables to the places required for substitution.


Well, then all that remains is to fill out the body of the message itself.

In addition, we have the task of looping this process so that the request is carried out at a certain interval. To do this, it makes sense to drag the “suspend” action from the action library, in which you can specify the time for suspending the process. I note (and this is important) that initially I tried to set 1800 seconds instead of 30 minutes, but the process did not work correctly, which is why in action you can set the delay dimension in seconds, minutes or hours. As far as I understand the manual, the counter is limited to 1000 units.

Well, the last action we need is a cycle, because we need to loop the process. To do this, we put the “Loop” action at the end of the process.
This action has several configurable parameters, namely: a mandatory user request to continue the action, which can be replaced with a fully automatic loop (which is what we actually need). The second parameter is the loop return point, we need to go back to the very beginning of the process, so we select “Use initial input”. Well, the third, quite important parameter is “stop after”. This parameter determines at what point the loop ends. There are two options here, either after a certain time interval, or after a certain number of cycles. Unfortunately, you cannot make an endless loop; setting this parameter to “zero” for both minutes and “times” does not lead to this (the loop will only be executed once), so it’s easier to choose what you like. The maximum counter value is also 1000 units. For myself, I personally chose 1000 times, which is 1000 cycles. Note that if this is not enough, put the next loop immediately after the first, this will execute the loop in a loop, and this is 1 million iterations, etc.

As a result, the final version of the process looks like this:

And the messages issued, firstly, are conveniently visualized on the desktop - popping up with the desired frequency, while you can always see their history, which looks something like this:

Now all that remains is to start the process. And it will begin to be executed by the Automator, and so that it does not interfere with the Dock, right-click on the Automator icon in the Dock and then “Hide”.

The main goal of this post is to tell you that with the help of such a wonderful tool as Automator, you can automate not only very complex tasks that require repeated repetition of routine actions, but also perform periodic tasks, with a fairly convenient visualization of query data.

It so happened that, with all its focus on people far from technology, OSX has an absolutely geeky tool - Automator, which, undeservedly, is bypassed by most Mac users. Many have heard about its unprecedented capabilities, but which way to approach it and how to use it?

Today we will discuss the basics, in the following materials we will go further. I want to warn you right away that we will look at the basic principles of working with Automator, solve several everyday problems, but will not touch on Apple Script. The reason is that Apple Script is a programming language with its own syntax, logic, and structure. Trying to explain the basics that will allow you to create something of your own in the future, and not copy without understanding, is quite difficult. Therefore, we will not deceive anyone, but will show what can be done without this knowledge.

I won’t describe what each of the menu items in the screenshot below means, just click on them with your mouse and read the description.

Let's build learning from tasks. We formulate the problem, solve it, record the result, move on to the next one.

1. View the clipboard

From time to time there is a need to view the contents of the clipboard. You copied something important, but you were distracted, and after a couple of hours you forgot and accidentally replaced important information in the buffer with some link.

What needs to be done. It is logical to assume that we will start viewing the contents of the clipboard through hotkeys. Accordingly, we need to create a service. Select the appropriate item when creating a new document.

  1. Then we need to read the contents of the clipboard; to do this, select the item on the left side of the menu Utilities → Get clipboard contents, which we drag to free space on the right side of the window.
  2. After this, the contents of the buffer need to be assigned to a variable; to do this, drag out the item on the work area Set variable value, click on it and give it a name, arbitrary. In the example, I simply called it: Buffer.
  3. Now we need to display a notification with our text, to do this we drag out the menu item Show notification, we write whatever we want in the header, the main thing is that you understand what it is, and insert the variable from step 2 into the body. You can simply drag it from the bottom of the panel by clicking on the icon that looks like an inverted Pause button.

After this, save the received document, the name is arbitrary. And go to the system settings menu  → System Preferences → Keyboard → Keyboard shortcut, select a section Services and look for the service we just created.

She will need to assign a key combination. I suggest Ctrl + Command + =. To assign you need to click on the word add, to the right of the service name, the word add will be replaced with an empty rectangle, then press the desired combination. After that, close the settings, find any fragment, copy it, press Ctrl + Command + = and enjoy the result.

All your services are always present in the top menu [Application name] → Services and launching them should not be difficult.

I showed only one example with notifications, but use them more often, for example, to notify you about the status of completed work from other automators.

2. Smart folder

Often the task arises of quickly changing some data - for example, converting images from PNG → JPG. Automator has a folder action for this.

It works as follows. First, we indicate the folder from which the data will be taken, then the folder where it will be copied. Finally, we denote the action, in our case Photo → Change image format.

Then we copy files with the PNG extension into the first folder and find documents with the JPG extension in the second. At the same time, you can resize the image.

Self-test task:

  • place a notification in the process that will provide information that the task has been completed;
  • try to make sure that files from the source folder are deleted automatically after the operation is completed;

Conclusion

Today we looked at the most basic features of Automator. Just looked at the basics. I think that the topic is interesting, but considering the solution to my problems may not be exciting enough for readers.

Let's do the following: leave your wishes (needs) in the comments, and by the next issue I will try to answer how to do this. Or share how Automator helps you in your daily life!

These free Automator actions are provided as is with no guarantees. Use at your own risk.

Download 01: Temporary Storage Actions v1.1

A set of actions for storing and retrieving data during the execution of an Automator workflow.

Options: Set the action input control of the retrieval actions to Ignore Results from Previous Action if you only want the retrieved items passed to the next action. Otherwise, the any item references passed from the previous action will be added to the beginning of the list of retrieved items.

Version 1.1 fixes an issue where the Store/Retrieve Disk Item References actions would fail if passed files whose names contained parens or special characters.

  • Store Disk Item References- This action will store references to the disk items passed from the previous action.
  • Retrieve Disk Item References- This action retrieves stored references to existing disk items.
  • Store Address Book References- This action will store references to the Address Book items passed from the previous action.
  • Retrieve Address Book References- This action retrieves stored references to existing Address Book items.
  • Store Text Data- This action will store text data passed from the previous action.
  • Retrieve Text Data- This action retrieves stored text data.
  • Store URLs- This action will store URLs passed from the previous action.
  • Retrieve URLs- This action retrieves stored URLs.
  • Store FileMaker Record IDs- This action will store the FileMaker Pro record IDs passed from the previous action.
  • Retrieve FileMaker Record IDs- This action retrieves stored FileMaker Pro record IDs.

Download 02: GarageBand Action Pack v1.1

The GB-Action Pack is an Action bundle for use with Automator and GarageBand. This application will enable 16 GarageBand actions within Automator.

Installation: No installation is required. Simply place this bundle in the same folder as GarageBand. The set of actions will automatically appear within Automator grouped in the GarageBand library in the Library list on the left of the Automator window.

  • Get All Tracks: This action will return references to all the tracks.
  • Get File of Front Song: This action will return a reference to the disk file of the front GarageBand document.
  • Get Selected Track: This action will return a reference to the currently selected track.
  • Open GarageBand File: This action will open a GarageBand file passed to it from the previous action. NOTE: this action requires that access for assistive devices be enabled in the Universal Access System preference pane.
  • Play Song: This action will play the GarageBand song.
  • Save Song: This action will save any changes to the GarageBand song.
  • Set Cycle Mode: This action will enable or disable Cycle Mode.
  • Set Master Volume: This action will set the master volume of the GarageBand song.
  • Set Pan of Tracks: This action will set the panning of the tracks passed to it from the previous action.
  • Set Tempo: This action will set the tempo for the GarageBand song.
  • Set Volume of Tracks: This action will set the track volume of the tracks passed to it from the previous action.
  • Stop Song: This action will stop the GarageBand song.
  • Zoom Window Full Screen: This action will expand the GarageBand window to fill the screen.
  • Find GarageBand Items: This action will find GarageBand tracks by their properties. For example, every track whose instrument name contains "piano." The result will be references to the matching items.
  • Filter GarageBand Items: This action will filter GarageBand tracks by their properties. For example, every track whose instrument name contains "piano." The result will be references to the matching items.
  • Export GarageBand Project: Exports your project. NOTE: this action requires that access for assistive devices be enabled in the Universal Access System preference pane.

Download 03: Icon File from Image v1.0

This action will create Mac OS X icon files (icns) from the images passed from the previous action. All icons are square in shape and include sizes of 128, 48, 32, and 16 pixels.

Download 04: Stop if Input is Empty v1.0

This action will stop the currently running workflow if its input is empty or null.

Download 05: Create Thumbnail Poster

This action creates a multi-page 20" by 30" PDF document of thumbnails of the images passed into it from the previous action.

Note: The original images are not altered. The resulting file can be very large in size, it is not unusual to have files over 300 Mb in size.

Requires: JPEG, TIFF, or PNG images, 5 Gb of disk space

Options: Thumbnails can be in either of three formats: square (96 images per page), horizontal (72 images per page), or vertical (72 images per page). The resulting file can be limited to a single page of the first group of images.

Download 06: Convert Text List to Text v1.0

This action converts a list of text strings passed from the previous action into a single block of character-delimited text. For example:

("Text string number 1", "Text string number 2", "Text string number 3")

using returns is converted into:

"Text string number 1
Text string number 2
Text string number 3"

using spaces is converted into:

"Text string number 1 Text string number 2 Text string number 3"

Place this action before Automator"s New Mail Message action anytime you are passing a list of text strings to the action in order to have them added to the newly created mail message content. The New Mail Message action only accepts a text string, it will not accept a list of text strings.

Download 07: Podcast Actions v1.0

These Automator actions can be used to help create podcasts:

Export Garageband Project- This action will export the current GarageBand project to iTunes. The result will be a reference to the new iTunes track. This action requires UI Scripting support to be active.

Export to MPEG Audio- This action will export MPEG audio files (AAC) from the AIFF files passed to it from the previous action. You can select multiple compression settings to create more than one export file. This action requires a valid QuickTime Pro license.

Create Podcast Feed- This action uses the audio files passed to it from the previous action and the information entered in the action view to create create the XML text needed to make an XML RSS podcast feed file. Follow this action with the New Plain Text File action to create a new XML file using the feed text.

New Plain Text File- This action writes the text data passed from the previous action to a plain text file (non-Unicode). Plain text files are useful for creating RSS feeds and other HTML or XML-based files for use on the internet.

Download 08: Mail Contents of Front Browser v1.0

This action will add the contents of the front Safari browser to a new outgoing message in Mail.

Download 09: Set Time Zone v1.0

This action sets the Time Zone preference based on the chosen city.

Download 10: Set Sleep and Wake v1.0

This action sets various wake and sleep properties in the Energy Saver System preference pane.

Download 11: Set Remote Access v1.0

This action sets the status of the Remote Login and Remote Apple Events properties of the Sharing System preference pane.

Download 12: Text Files to HTML Files v1.0

This action creates an HTML file or Safari webarchive from the content of the text files passed from the previous action. One HTML or webarchive file is created for each of the passed files. Source files must be in text, rich text, Word, or Word XML format.

Download 13: Add Image Overlay v1.0

This action imports a chosen image into the movie files (.mov) passed from the previous action. Works best with TIFF or PNG images containing alpha channels. The overlay images can be posted at the top left, center, and right, bottom left, center, and right, and the center of the movie.

Download 16: Save Image Attachments

This action will save images, attached to Mail messages passed from the previous action, to a chosen folder. Requires Mail 2.0.5 or higher (Mac OS X v10.4.3)

Download 17: Convert iPhoto Item Object to Alias ​​Object

This "invisible" conversion action fixes an issue with Automator 1.0.2 in Mac OS X v10.4.3 where conversions from iPhoto items to file references are not triggered.

Download 18: Duplicate Finder Items

This action will make a copy of each of the Finder items passed from the previous action into the same folder as the original item.

Download 19: iChat Actions

Three actions for controlling iChat:

Connect to iChat- This action will attempt to connect to the iChat network. If the connection is not made after 60 seconds, the action will post an timeout error. Note: This action is commonly preceded by the Launch Application action set to open iChat.

Initiate Chat- This action will attempt to begin a chat session with an indicated iChat account.

Set iChat Status- This action will attempt to change iChat's status. It will wait up to 120 seconds for the status to change.

Download 20: Create Mail Message

This action creates a new outgoing Mail message that accepts references to disk items, a text string, or a list of text strings, as optional input. All Address Book entries are available, even when the action is set to Show When Run.

Download 21: Create Dated Folder v1.2

This action will create a new folder in the indicated location. The folder will be named using the chosen date formatting and any optional name. If the Action Input Control is set for Use Results from Previous Action, then any disk items passed from the previous action will be copied or moved into the newly created folder.

Download 23: Import Items into iPhoto

NOTE: Issues addressed by this action have been fixed in the Mac OS X 10.4.6 update.

This action (version 1.1) will import images and movies, passed from the previous action, into iPhoto 6 (part of iLife "06). Supported Image Types: TIFF, JPEG, PICT, PNG, BMP, GIF, PSD, SGI, TGA , and PDF. Supported Movie Types: MOV, and MP4.

NOTE: Some exisiting terms in the iPhoto 6 scripting terminology were changed from what they were in iPhoto 5, causing Automator's Import Photos into iPhoto action to no longer work properly. If you have iPhoto 6 installed, use this action instead of the default action in Automator.

Download 24: Aperture Actions Update

This application will install updated versions of the Export Images and Choose Albums actions included with the Aperture 1.0 installation. Also included with the installer are two actions to replace existing Apple actions: Import Items into iPhoto to replace the Import Photos into iPhoto action which no longer works with iLife 06, and Create Dated Folder to replace the New Dated Folder action included with the Aperture 1.0 installation.

Download 25: Set Movie Annotations (update) v1.1

This application will install an updated version of the Set Movie Annotations action that ships with Tiger. The updated version addresses changes in the QuickTime 7.0.4 QuickTime Player application. Accepts movie files as input (.mov).

Download 26: Start Front Row v1.0

This action will start Front Row. Requires an installation of Front Row.

Download 27: Take Picture v1.0

This action will cause the Photo Booth application to take a picture. Requires GUI scripting to be activated.

Download 30: Get Image URLs from iWeb Photos Page v1.0

This action will retrieve the URLs of image files linked from a photo catalog webpage generated by the iWeb application.

Generally, these types of pages have URLs beginning with http://web.mac.com and contain a Start Slideshow button followed by small thumbnail images linking to larger versions of the images.

This action also works on the slideshow-viewer webpage displayed when the user clicks the Start Slideshow button.

Download 33: Filter Images by Orientation v1.0

This action will filter image files passed from the previous action according to the chosen orientation parameters.

Download 36: Display as SlideSaver v1.0

This action will display the image files passed from the previous action as a SlideSaver slideshow presentation. If it doesn"t already exist, a slidesaver named “Recent Photos” will be added to the Screen Savers list in the Desktop & Screen Saver system preference pane.

Today we have a premiere - the new, eleventh series of AppStudio articles, which we conceived a long time ago, opens. In it we will talk about Automator, the most powerful tool automation of routine actions, which is available to any Mac owner. But here’s the paradox: not every poppy grower uses it, and what’s more, not every poppy grower even knows about its existence. Automator is an unremarkable and not particularly noticeable utility; you can only find and launch it because of its icon.

Utilities designed to automate the workflow, as well as simply any set of actions, appeared relatively long ago. They are successfully used in large businesses. But it is sometimes useful for an ordinary user with fairly simple tasks to know about the existence of such programs, because routine operations become boring, they involuntarily cause a reluctance to work with a computer. But sometimes you just need to know that there are assistants who can simply and easily automate such tedious operations.

Automator, a built-in assistant in OS X, can save hours, days, and even weeks of time if you have the ingenuity and desire to optimize your work. And in conjunction with the scripting language, AppleScript Automator can generally solve a significant part of the questions that are sent to us in the FAQ section. As in the case of the Terminal, when talking about Automator, you can quickly go into the weeds, but you shouldn’t immediately sum it up by stating “No, this crazy thing is not for me.” At least 90% of our advice can easily be useful to an ordinary person who is far from any kind of computer specialties.

Yes, indeed, this is so. We will create full-fledged program. It will be executed, helping us perform monotonous operations. But this does not require reading too thick tomes. It's quite simple.

First, we need to launch Automator itself. This is done simply. Next, select “Program” in it. In this example, we will look at creating a standalone program, the same as the rest of the programs in the system.

In general, Automator works on the principle of a constructor. You tell it where to get the input data, what actions need to be performed on it, and where to put/copy the result. Taking advantage computer technology, we can say that Automator constructs macros. And each such macro, which is a collection of commands, can exist in different incarnations:

  • a process that runs directly in Automator and cannot exist outside of it
  • a program that is done once and then lives on its own
  • a service that integrates into OS X and is accessible from anywhere
  • folder action, which keeps track of any objects you put in your chosen folder and runs the necessary commands on them

As you can see from the screenshot above, the matter is not limited to this, but we will talk about other types of Automator files later. For now, let's focus on creating our own programs.

Our first program will combine several PDF documents into one, allowing us to select the source files along the way, and then kindly showing us the result on the desktop. PDF is one of the formats that is written quite deeply in the operating system, feels good and works great. So you shouldn’t be surprised at the support for many operations for working with this format without installing additional software.

Let us repeat once again: Automator macros are a set of sequentially performed actions. They can be presented in the form of a certain time scale, where conditional stages are sequentially highlighted. In our first example there will be three of them: selecting files, conversion, which we will not see, and output, which, by the way, we will get quite quickly. In principle, the step of sending the received file by email can easily be inserted into this chain by analogy.

The Automator window consists of two parts - the action library is located on the left, and the action library is located on the right. workspace. A macro is constructed by simply dragging actions from the left side of the screen to the right.

So, let's add our first stage:

Here you can clearly see where this operation is located in the menu on the left. It is worth noting that we must check the box multiple choice. The fact is that this stage is universal, he will never know that we want to receive several files, so we clearly tell him about this, because merging one file is not part of our plans!

Next, we need to select an operation to process the received files. Just drag it, forming a chain. Here you can clearly see that the selected files will be transferred further for operations with them, the arrow here clearly demonstrates everything, check for the presence of a dedicated button adding pages. It’s already highlighted, but still. You can simply mix the pages, but most likely you will still need to glue them together in order.

We complete our program with an operation for files. Let's move the result to a certain folder. Well, let’s assume that it’s on the desktop, although there’s no difference, the main thing is that it’s convenient for us.

Well, now we’ll turn our project into a full-fledged program:

We choose a place to save it, check that we are offered to save it as an application, and then look at what we have in the specified location. And a program should have appeared, a file with the extension .app.

Now we can use it at our own discretion - when you start it, it will ask you for files, after which it will silently glue them together without any unnecessary windows and place them on the desktop.


Close