The Automator application is a tool that lets you automate repetitive tasks by creating sequences of actions from various applications called workflows. Actions that can be used in workflows include copying, renaming and cropping images from a digital camera, creating playlists in iTunes and recognizing and saving large numbers of files in ABBYY FineReader.
You can find basic instructions for using the Automator application here: https://support.apple.com/guide/automator/welcome/mac
You can launch the Automator:
- from the Launchpad,
- from the Applications folder
- using spotlight (the search bar).
When you launch Automator, a dialog asking you to choose a template for your workflow will be opened:
Select one of the available templates and then click the Choose button to create a new workflow in Automator.
After you open a workflow, the Automator window will contain the following panels:
- (1) A Library column on the left. This column contains a list of actions which can be grouped by category or by application.
- (2) An Action column in the middle. This panel contains actions from the selected category or application.
- (3) A search bar you can use to quickly find the actions you want to add to the workflow.
- (4) An information panel in the bottom-left corner of the window. This panel contains helpful information about the selected action.
- (5) A workflow pane on the right side of the window. Workflows are created by dragging actions to this pane.
- (6) The “Application receives” pop-up menu bar.
Adding new actions to a workflow
In the Library, select the category or application that contains the actions you want to use in your workflow.
To add an action to the workflow, drag it into the workflow panel or double-click it.
Saving and using a workflow
After you have created a workflow, you will need to save and enable it.
- To save and install a workflow, click Save As… on the File menu. Once saved, a workflow becomes available system-wide.
- To use the new workflow, click Services on any application’s menu and enable the workflow in the dialog that appears.
Examples of workflows that automate ABBYY FineReader tasks.
Folder Action workflow
Purpose of workflow: extracting text from screenshots
Solution: create a workflow that automatically processes screenshots that were made with the Grab application and placed in a specific folder.
The Grab application has the following keyboard shortcuts for taking screenshots:
- Command+Shift+3 captures the entire screen
- Command+Shift+4 captures a selected area
By default, screenshots are saved to the desktop, but we need to save them to a folder so that our workflow can process them. Complete the following steps to change the directory in which Grab saves screenshots:
- Create a new folder. In this example we’ll call this folder Screenshots, but you can choose any name you want.
For simplicity’s sake, we’ll place this folder on the desktop in this example, but you can create this folder anywhere you want.
- Execute the following command in the Terminal application:
defaults write com.apple.screencapture location ~/Desktop/Screenshots/
- Execute the following command to save the changes you just made:
Now screenshots will be saved to the Screenshots folder on the desktop.
Before creating the workflow in Automator, create a folder in which you want to save text from the screenshots. We’ll call this folder Screenshot_text.
Next, create the workflow in Automator:
- Create a new workflow from the Folder Action template.
- To enable the workflow for the Screenshots folder, click Other… on the drop-down list in the “Folder Action receives” pop-up menu, and then select the Screenshots folder in the dialog that appears.
- Select the Documents library and find the “Convert to TXT document” action from the FineReader application. Drag this action from the Actions panel to the Workflow panel.
- Set up processing options for this action: specify the language of text on the screenshots, specify the path to the Screenshot_text folder in the “Save output to:” field and select the appropriate conversion settings.
- Save the workflow
Now whenever a new screenshot appears in the Screenshots folder, any text on this screenshot will be automatically saved as a TXT file in the Screenshot_text folder. TXT is not the only text format at your disposal. Depending on the data your screenshots contain, you can choose to save text from screenshots as an Excel workbook, Word document, or in any other format available in ABBYY FineReader. To save text in a different format, select the corresponding action in Automator.
To disable this workflow, delete the Screenshots folder or select Services > Folder Action Setup from this folder’s contextual menu and disable the Enable Folder Actions option in the dialog that appears.
Drag & Drop
Purpose of workflow: add a text layer to scanned documents.
Solution: create a workflow that automates repetitive operations for converting images and image-only PDF files received from a scanner into PDF documents with a text layer.
- Create a new process from the Application template.
- Add the “Get Specified Finder Items” action to the workflow. The workflow will receive files and folders containing images or PDF files as input.
- Add the “Copy Finder Items” action. When using automated workflows, it is usually a good idea to avoid working with original files and instead work with their copies to prevent accidental loss of important data. Create a new folder for these copies and specify the path to this folder in the To drop-down list.
- Add the “Convert to PDF Document” action to the workflow. Select the “Text under the page image” export mode in the action’s settings and specify a folder for saving recognition results.
- Add the “Rename Finder Items” action to the workflow. You can make searching for output files with text layers easier by adding a bit of text to the file names, such as “_OCR”, subsequent numbering or timestamps.
- Save the workflow.
Scheduling (iCal reminder)
Purpose of scenario: periodically convert image files placed in a folder by a scanner from the network or a mail client into PDF.
Solution: create an iCal reminder to launch a task that processes files in a specific folder.
- Create a new workflow from the iCal Alarm template.
- Select in Files & Folders library action Get Specified Finder Items and add it to the workflow. Click the Add button to specify source files or a folder with source files on which the action will be performed.
- Add the Get Folder Content action.
- Add the Move Finder Items action.
Specify the target folder where the output files shoud be moved. This action will move the files from the input folder before the next iteration of the workflow. If you want to remove the input files you can move them to Trash using the Move Finder Items to Trash action.
Please note that all Automator actions are linear and the next step input is the previous step output. That`s why after moving files they are still in Automator`s "clipboard".
- Select in Documens library action Convert to PDF Document.
Specify the desired options in the action’s settings and provide the path to the folder in which you want to save output documents in the Save Output to box. The output folder should not be the same as the folder with input documents. If it is, you may lose your input files and the output files may be difficult to find.
- Save the workflow.
A new event will appear in iCal.
By default the event will appear in the Automator calendar. You can move it to any other calendar and edit the event’s schedule, including its:
- time and date;
- conditions that disable the event, such as disabling the even after it occurs 10 times.