Automator mac os ready image. Five Automator procedures for those who value their time

On every Mac computer The Automator application is installed by default. Using a dedicated user interface, this underrated program allows you to automate monotonous tasks and speed up your work. Here are some workflows you can create in Automator.

Rotate images

One of the most frustrating aspects of digital photography is managing the backlog of files. And if you use a camera without a gyroscope, you could end up with hundreds of photos that are flipped the wrong way. Of course, you can review and flip them manually, but this process can be automated quite easily.
First, add a Query Finder Items action to the workflow window, then click the multiple selection checkbox. If you want to leave original versions in its original form, you can add a "Copy Finder Items" action. Now add from the Photos list, select the Rotate Image action and save your workflow. If you don't know which way to rotate the images, you can save two versions - one for left rotation and one for right rotation.

Bulk file renaming

If you have to work with files from several different sources, their names are often completely unclear. This is usually not a big problem, but in some cases careful classification is required. Instead of manually renaming each file, you can let your Mac do the job for you
Add a "Query Finder Items" action, switch to multiple selection, and decide whether you want to rename original files or create copies. If you need to make copies, add a Copy Finder Items action. Now add "Rename Finder Items". After this, use the configuration menu to configure the renaming scheme as you wish. You can select the "Make sequential" action, as well as the "Add date and time" action (enabled automatically).

Text to Speech

OS X's built-in text-to-speech engine can be very useful for many tasks, and Automator allows you to quickly create an audio file from a text source and save it to disk in AIFF format.
There are many ways to add text to a workflow, but the simplest is to paste the text into a TextEdit window and then add a Get TextEdit Document Contents action. Then add "Text to Audio File", choose which voice you want to use and name the file.

Emergency blocking

If you live or work surrounded by people, sooner or later your Mac will be left unattended. To protect your computer from unwanted access, you can simply close all applications and shut down the system, but this entire process can be simplified to just one click.
Start by adding the "End All Programs" action. If you don't want to deal with additional reminders, turn off the "Ask me to save changes" checkbox. But there is a risk of losing unsaved data, so you need to be careful here. Then add an action to mute the computer. After this you need to add “Make Screensaver”. Assuming you've previously configured your Mac to require a password when sleeping ( System Settings> Security>General), your Mac will be locked with one click.

Writing scripts

Without a doubt, Automator's most powerful feature is the ability to run Apple and Java scripts into a workflow. Scripts can be as complex as you need and can greatly expand the standard functionality of Automator.

To run scripts in a workflow, you simply need to add a Run JavaScript, Run AppleScript, or Run Shell Script action. The use cases are almost limitless, but here is one example of using a script in a workflow.
This script automatically resizes the Safari window, which is great for testing new website layouts.

Conclusion

Once you start creating workflows, you can get carried away and try to optimize every action on your computer. The burden of routine and tedious work can be lifted off your shoulders with a few tweaks in Automator, but it's not worth spending hours on end trying to save a few minutes. Take advantage of the benefits of automation, but remember that it is not a panacea for every situation.

Today we have a premiere - a new, eleventh series of AppStudio articles is opening, which we conceived a long time ago. In it we will talk about Automator, the most powerful tool for automating 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 find and launch it only because of the icon.

Utilities designed to automate the workflow, as well as simply any set of actions, appeared relatively long ago. They are successfully used in big business. 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 in this example we'll look at creating a standalone program, just like the rest of the programs on 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. Using 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, this doesn’t stop there, but we’ll talk about other Automator file types 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 of many operations for working with this format without installing additional software.

Let us repeat 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, in this chain you can easily, by analogy, insert the stage of sending the received file via e-mail.

The Automator window consists of two parts - the action library is located on the left, and the workspace on the right. 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 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.

Oddly enough, Automator has been one of the significant advantages of Mac OS X for many years now, compared even to the last one. Windows version. In addition to the fact that it can process a wide variety of data quite flexibly, “Automator” is also easy to use - the rules for processing information are compiled like cubes. However, the simplicity of this program is still far from the mythical “Do as I want” button. Therefore, some points that may be unclear to beginners are still worth clarifying.

By task and process

Depending on the situation in which you want to automatically perform specific actions, you should choose the most appropriate process type.

In the third version, Automator has significantly added to the number of types of data processing rules (or processes) - there are now seven of them. Which of these types to choose depends on the conditions in which you want to run your future algorithm. The first type Process(Workflow) is a standard type of algorithm that can be launched either from Automator itself or saved as an application.

However, Application(Application) is the second type of Automator process that you can create from the very beginning. The name itself says that as a result you will receive a small utility (or droplet) that accepts data and processes it in strict accordance with the algorithm you created - without launching Automator. You can place the app in the Dock, Toolbar, or Finder sidebar. After this, you just need to select the required files and drag them onto the application icon - it will start, do its job and close. This way, without launching Automator itself, you can, for example, scale a stack of photos or fill in the tags of selected audio files.

Features of processes like Service(Service) is that they can be built into the context menu of programs specified in advance. Remember in the online dictionary Lingvo - the “Automator” service was used there. Of course, in addition to textual information, the service can be “fed” graphics, sound, video, PDF files - it all depends on what application you are creating the service for and what task it must perform.


The input can be not only files from the folder opened in the Finder, but also from the directory of one of the multimedia Apple programs- this data is available through the media browser built into Automator.

Folder Actions(Folder Actions) themselves have existed for a very long time, and Automator only makes it easier to create them without the need for knowledge of the AppleScript programming language. This type of process is triggered when any files are placed in the specified folder. The most obvious example of using folder actions is to automatically sort data into nested subdirectories. For this there are third party applications- however, you can cook up their analogue yourself in Avtomat.

Print plugin(Print Plugin) is built into the PDF menu in the print dialog. With this type of process, you can control the creation of a PDF file from the current document in Text Edit, Pages, Microsoft Word etc. For example, when creating a PDF, you can mark each page with a “watermark” or convert the pages of the generated PDF document into raster images.

iCal Reminder(iCal Alarm) are processes that are running in specified time. Let's say, on the birthday of your beloved grandmother, such an event can automatically create a letter according to the specified template - all you have to do is select the design and click the send button. You can even organize a group mailing, thereby inviting guests to the same birthday or wedding.

Finally, Image capture plugin(Image Capture Plugin) - this process is built into the module for importing photos from your camera. When copying files from the camera to an iPhoto or Aperture photo library (or simply to a folder), such a process will start itself and perform certain actions - add all the pictures to a specific album, add a text annotation to each of them, etc.

Macros at random


By clicking on the record button, manually execute all the necessary commands using the mouse and keyboard. When finished, stop recording and view the list of commands recorded by Automator.

If you are familiar with applications Microsoft Office, you know that they have (in the Mac version there was) a mode for recording actions. This is when you simply select the necessary buttons and menu commands, enter some text, add some objects - and the program consistently records all your actions. The third version of Automator is equipped with a similar mode that remembers not only your actions, but also the programs in which they were performed. The playback speed of recorded actions can be adjusted from one tenth to ten times. The recording mode is activated by the corresponding button on the Automator toolbar.

Display Mode

Notice the sidebar of the Automator window. By default, the action catalog (Library) is structured by categories - actions are grouped depending on what types of data they work with. But instead of categories, you can display a list of applications to which actions are associated. To do this, select the command in the “Automator” menu ViewSort actions byprogram (ViewArrange Actions byApplication).

Who's ready?

The creation of many processes can be simplified even further by downloading them from one of the specialized sites dedicated to the Automator program. Bookmark these resources:
automatoractions.com ,
,
,
,
.
In addition, sets of actions are being developed for professional programs - products from Adobe, Quark and others - for which you already have to pay, sometimes impressive sums.

Examples and reference

For those who are completely unfamiliar with Automator, but want to master this program, it is worth paying attention to simple examples that, although not always interesting from a practical point of view, form an idea of ​​​​the possibilities of automating tasks on a Mac. Take note of these resources and web pages: homepage.mac.com/cjrtools/automator-apps/index.html,
,
.

If the topic of automation is interesting to ProstoMAK readers, step by step instructions creating useful processes will appear regularly in this blog. Let me know in the comments what you think about it.

In his first post on this resource I'd 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 configurable, and the history is conveniently stored in the message lists of the notification center of Mac 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 a field for forming the process body, into which we drag the actions and variables we need from the library in the chronological order in which they should occur within the framework of the process being formed.


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.

For a process to execute this command in the shell, drag the corresponding action from the library into 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, rather 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.

While you Mad from fast Siri commands In the iOS 12 beta, we play adult games with Automator, a macOS automation editor that is monstrous only at first glance. It replaces 10 third-party utilities that you have already purchased or locked, and 5 more that you have just collected.

Today we will upgrade our work with macOS files: let's create 10 Finder Context Menu Commands with popular teams for every taste.

First we will create a template for actions with files

Step 1. Open Automator.

Step 2. Click on the “New Document” button.

Step 3. In the new document type window, select the “Service” option.

Step 4. In the "Service receives" drop-down menu, select "Files or folders" in "Finder.app".

Step 5. Open the “Files and Folders” section from the menu on the left, select “Get Selected Finder Items” and drag this item to the menu on the right.

At this stage, you have a template, on its basis you will create as many as 10 items for the Finder context menu that will help you work with files.

By the way, by default new services are saved to the Libraries > Services directory.

1. Rename with date

Step 1.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3.

Step 4. In the first drop-down menu, select “Add date or time”, and configure everything else based on the example below.

With this command, I suggest you add the current date, starting with the year, right before the name. It seems to me that this feature is convenient when a bunch of fresh files constantly appear on your Mac.

For example, you are a photographer and upload photos for today. In order not to get lost in them, it’s easier to immediately name them with the date. Agree?

2. Rename sequentially

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the Rename Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 4. In the first drop-down menu, select “Make sequential”, and configure everything else based on the example below.

Another handy tool to rename files. For example, when I'm preparing material for publication on the Internet, I use it to quickly rename screenshots or other images. It saves me time.

3. Replace text in file name

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the Rename Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 4. In the first drop-down menu, select “Replace text”, and then

You can specify what and what in the file name should be changed each time you use the command.

4. Set the program as default

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the "Install program for files" script from the "Files and Folders" section from the left menu to the menu on the right.

Step 4. In the “Program” drop-down menu, leave “Default”, and then expand the “Options” menu and check the box next to “Show action while running”.

It is those files for which you change the default program using this command that will be opened immediately in it - in this case we are talking about specific documents, and not the format as a whole.

Similar to the previous menu, we use here an additional application selection window to create a universal command.

5. Filter and archive

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3.

Step 4. Expand the “Options” menu and check the box next to “Show action while running.”

Step 5. Drag the “Create Archive” script from the “Files and Folders” section from the left menu to the menu on the right, configure it as you wish.

I continue to complicate the commands so that you better understand the meaning of the Automator program.

This time we are using the command not for 2, but for 3 levels. An intermediate step in this will be determining the types of files that need to be added to the archive. We display it in a separate window.

It turns out that you can select at least all the files from the “Recent” menu and add only images to the archive.

6. Filter and delete

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the Filter Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 4. Expand the “Options” menu and check the box next to “Show action while running.”

Step 5. Drag the "Move Finder Items to Trash" script from the "Files and Folders" section of the left menu to the menu on the right and configure it as you wish.

In this team we did almost the same thing as in the previous one. Only instead of archiving files using a filter, they used deletion.

This command is perfect if you want to clean up files on the disk. For example, you can delete movies that take up a lot of space - this can be easily configured through the filter.

7. Filter and rename

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the Filter Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 4. Expand the “Options” menu and check the box next to “Show action while running.”

Step 5. Drag the Rename Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 6. Expand the “Options” menu and check the box next to “Show action while running.”

As you understand, you can use not one, but several dialog boxes at once while working with files.

In this case, we first filter the files we want to use, and then rename them according to the template we need in this case.

I’m sure now you clearly see that you simply don’t need any additional software for renaming objects, you can easily create the necessary command yourself.

8. Filter and rename to folder

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the Filter Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 4. Expand the “Options” menu and check the box next to “Show action while running.”

Step 5. Drag the Copy Finder Items script from the Files and Folders section of the left menu to the menu on the right, select a location, and enable Replace Existing Files.

Step 6. Drag the Rename Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 7 Expand the “Options” menu and check the box next to “Show action while running.”

Here we do exactly the same as in the previous paragraph, but we no longer use originals, but copies, as files for renaming.

Imagine that you are sending photos from one folder to your family. You will have the opportunity to sort only the most recent ones, rename them by date or sequentially and immediately copy them to separate folder. Miracles of automation!

9. Filter and email

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the Filter Finder Items script from the Files and Folders section of the left menu to the right menu.

Step 4. Expand the “Options” menu and check the box next to “Show action while running.”

Step 5.

Step 6.

You should be well aware that in Automator you can use commands from more than just one section. You have the opportunity to combine different ones and get an interesting result.

For example, in this case, we created a command with which you can filter the necessary files from the selected ones and immediately attach them to a new email. This may be useful to you in your work.

10. Send archived email

Step 1. Open the template you created in the first step of the “lecture”.

Step 2. Duplicate it via “File” > “Duplicate”.

Step 3. Drag the "Create Archive" script from the "Files and Folders" section to the menu on the right and select "Input Folder" from the "Where" drop-down menu.

Step 4. Drag the “New Mail Message” script from the “Mail” section from the left menu to the menu on the right.

Step 5. Drag the "Attach files to sent message" script from the "Mail" section of the left menu to the menu on the right.

Forget about the file filter. Using this command, you will simply archive the selected files and immediately attach them to a new email.

I always use this command when I am asked to send some documents by email, it is very convenient.

Today we only went over some of the basic elements that can be implemented using Automator so that you have a general understanding of how to work with the program.

If you support the topic with a like and comment, we will definitely continue the series of articles on automation. I'm waiting for feedback!

P.S. Be sure to write about your tasks that you want to automate. We'll try to help.

5.00 out of 5, rated: 3 )

website Well, you yourself asked for a boost in Automator!

Publications on the topic