Automator应用程序是 macOS 中隐藏的一颗宝石,没有太多Mac用户知道。该工具可让您创建自定义快捷方式(快速(Quick) 操作(Actions)、工作流程(Workflows)和应用程序(Apps)),帮助自动执行重复和乏味的任务(automate repetitive and tedious tasks)。
我们将简要探讨Automator应用程序的一些功能,并向您展示如何为简单的日常任务创建自动化。

1. 截图
macOS 有多种用于捕获屏幕截图和录音的键盘快捷键。但是,使用Automator应用程序创建一个独立的屏幕截图(Screenshot)应用程序是另一种有趣的方式来截取 Mac 的显示。
- 转到Finder >应用程序(Applications)并选择Automator。

- 当要求选择文档类型时,双击应用程序。(Application)您也可以选择Applications并选择Choose。

- 在Actions选项卡中,选择Library,滚动到操作列表的底部,然后双击Take Screenshot。

更好(Better)的是,在搜索框中输入 screenshot 并双击Take Screenshot。

您还可以将“截屏”(Take Screenshot)操作拖放到Automator窗口的空白部分。

- 在“截屏”窗口中,如果要截取整个屏幕,请选择“全屏”或“(Full Screen)交互(Interactive)”以截取特定部分。

- 如果您希望在运行自动化几秒钟后捕获屏幕截图,请选择Timed复选框。(Timed)在“秒延迟”对话框中指定延迟时间。

如果您有另一台显示器连接到您的Mac并且您想要捕获所有连接的显示器,请取消选中“仅主显示器”选项。(Main Monitor Only)选中该选项将仅在您运行Automator工作流程时捕获您的主要/主监视器。
- 接下来,选择要保存屏幕截图的位置。默认情况下,Automator将屏幕截图保存到剪贴板。要将其保存在Mac上的其他位置,请展开“保存到”(Save To)下拉选项并选择存储目标。

- 选择右上角的运行以尝试自动化。(Run)

- 然后,按Command + S保存自动化。或者,选择菜单栏上的文件,然后选择(File)保存(Save)。

确保使用可让您记住其功能的描述性名称保存工作流,尤其是在您有多个Automator工作流时。
- 前往您保存Automator工作流程的文件夹,然后双击该应用程序以启动屏幕截图工作流程。

这将立即捕获您的整个屏幕并将其保存到设定的位置。如果您选择交互式屏幕截图,系统将提示您选择要捕获的窗口/应用程序或屏幕的一部分。

我们建议将Automator应用程序固定到Dock以便于访问。现在,您可以通过单次触控板或鼠标单击继续捕获屏幕截图。
2. 退出所有应用程序
您还可以创建一个Automator应用程序快捷方式,只需单击一个按钮即可关闭所有应用程序(或选定的应用程序)。当您需要关闭Mac或释放内存时,这比手动关闭多个应用程序要好得多和快得多。
- 打开 Automator 应用程序并选择快速操作(Quick Action)作为文档类型。

- 在“操作”选项卡中,展开库(Library)文件夹,选择实用程序(Utilities),然后双击子类别中的退出所有应用程序。(Quit All Applications)

- 移动(Move)退出所有应用程序(Quit All Applications)窗口以配置工作流。确保选中“要求保存更改(Ask to save changes)”框,以免丢失未保存的数据。

这将提示Automator显示一个确认弹出窗口,要求您在运行快速操作时保存所有更改。
- 如果您希望在运行快速操作时保持打开某个应用程序,请选择“添加(Add)”按钮以将该应用程序添加到“请勿退出”豁免。

您可以选择添加当前应用程序(Add current applications)按钮将所有当前活动的应用程序添加到豁免列表。
- 按Command + S保存快速操作。或者,选择菜单栏上的文件,然后选择(File)保存(Save)。

- 为快速操作起一个描述性名称,选择存储位置/文件夹,选择应用程序(Application)作为“文件格式”,然后选择保存(Save)。

当您打开快捷方式时,您的 Mac 将自动关闭所有活动的应用程序。(Mac)对于具有未保存的工作或数据的应用,您会在关闭应用之前收到保存文件的通知。
3.设置(Set)并应用(Apply)固定计算机(Fixed Computer)卷
(几乎(Almost))每个人都有一个“完美的音量”,声音输出(或输入)既不太低也不太高。根据一天中的时间,我的在 50-60% 之间。如果您与其他人共享您的Mac并且他们总是弄乱您的声音设置,您可以通过单击按钮将音量输出和输入重置为您的偏好。
这比每次需要更改音量设置时都转到系统(System) 偏好设置(Preferences)更好。
- 打开 Automator 并选择应用程序(Application)作为文档类型。

- 在“操作”选项卡中,选择“库”文件夹中的实用程序,然后选择(Utilities)设置计算机卷(Set Computer Volume)。

- 这些工具将捕获并在底部窗口中显示您当前的音量设置。根据您的喜好调整滑块,然后按Command + S保存更改。

- 每当您需要将 Mac 的音量设置重置为您喜欢的水平时,启动您创建的应用程序。

4.设置音乐音量
您还可以创建一个Automator应用程序,专门为音乐(Music)应用程序设置音量。因此,如果您有一个喜欢早上听音乐的音量,这里是如何创建一个快捷方式来恢复音乐应用程序中的音乐播放音量(Music)。
- 启动Automator,选择Applications作为文档类型,选择Actions选项卡,在搜索栏中输入音乐音量,然后选择(music volume)Set Music Volume。

- 将滑块调整到您喜欢的音量级别。或者,选择当前 iTunes 音量(Current iTunes Volume)以采用音乐(Music)应用程序中的当前音量输出级别。

- 按Command + S保存Automator应用程序快捷方式。确保为应用程序提供描述性名称并将其保存在您可以轻松访问或记住的位置。选择保存(Save)继续。

就是这样; 每当您启动“设置音乐(Set Music)音量”应用程序时, macOS 都会调整音乐应用程序的音量。(Music)当您第一次打开应用程序时,您会收到提示授予Automator快捷方式访问“音乐(Music)”的权限。选择确定(OK)继续。

5.合并PDF文件
macOS 有几个内置工具可以将 PDF 文档合并到一个文件(merging PDF documents into a single file)中。但是,Automator应用程序非常快,它提供了更多用于合并PDF文档的选项和样式。
- 打开 Automator 并选择快速操作(Quick Actions)作为文档类型。

- 在搜索栏中输入 pdf 并选择合并PDF页面(Combine PDF Pages)。

- 选择您希望如何组合PDF页面。附加页面(Appending pages)会将辅助 PDF 文档的所有页面添加到主(PDF)PDF文档的末尾,而无需重新排列页面顺序。假设 Document 1(Say Document 1)有 5 页,而Document 2有 7 页。生成的PDF文档将有 12 页(PDF)——Doc 1的前 5 页和Doc 2的第 6-12 页。
(Shuffling pages)另一方面,洗牌页面将创建一个新文件,其中每个文档的页面以交替顺序排列。那是; Doc 1中的第1页,Doc 2中的第 2 页, (Doc 2)Doc 1中的第 3页, Doc 2中的第 4 页等。你得到了漂移。

- 接下来,展开侧边栏上的“Library”文件夹,选择Files & Folders,然后双击Move Finder Items。

- 在“收件人”下拉部分中,选择您希望保存生成的PDF文件的位置。

- 按Command + S,在对话框中输入描述性名称,然后选择Save。

要使用快速操作(Quick Action)来合并或合并多个PDF文件,请选择并按住 Control 单击文件,选择快速操作(Quick Actions),然后选择您创建的Automator操作。(Automator)

Automator将根据您选择的组合方法(在步骤 #3 中)组合文件,并将生成的PDF文档保存在指定位置。
修改(Modify)Automator 应用程序(Automator App)或快速操作(Quick Action)
您始终可以编辑分配给通过Automator创建的快速操作或(Automator)应用程序(Application)的工作流/指令。
编辑快速操作和 Automator 应用程序(Edit Quick Actions and Automator Apps)
- 打开 Automator 并选择打开现有文档(Existing Document)。

- 导航到项目所在的文件夹,然后选择要编辑的快速操作(Quick Action)或应用程序。(App)选择打开(Open)继续。

(Make)对快速操作(Quick Action)或应用程序(App)进行调整,然后按Command + S保存更改。
如果找不到快速操作(Quick Action)的位置,请转到系统偏好设置(System Preferences)>扩展(Extensions)并检查侧边栏上的Finder或Touch Bar类别。按住 Control 并单击(Control-click)快速操作(Quick Action)并选择在 Finder(Show in Finder)中显示。

双击(Double-click)您要编辑的操作并更改Automator应用程序中的配置。

让任务更轻松
Automator应用程序有数百个自定义选项,我们不可能在这篇文章中涵盖所有这些选项。您可以使用 Automator 批量重命名文件、在(use Automator to bulk rename files)Safari中保存网页中的图像等等。浏览Automator应用程序,探索自动化选项/类型,并检查您可以自动化的日常任务。
顺便说一句,我们在运行 macOS Monterey的(Monterey)MacBook Pro上创建并测试了本教程中的自动化选项。如果您在Automator应用程序中没有找到上述任何快速操作(Quick Actions)或应用(Apps)程序,请更新您的Mac并再次检查。
5 Cool Things You Can Do With Automator App on macOS
The Autоmator app is one hidden gem in macОS that not too many Mac users are aware of. The tool lets you create сustom shortcuts (Quick Actions, Workflows, and Apps) that help automate repetitive and tedious tasks.
We’ll briefly explore some functionalities of the Automator app and show you how to create automations for simple everyday tasks.

1. Capture Screenshots
macOS has a variety of keyboard shortcuts for capturing screenshots and recordings. However, creating a standalone Screenshot app using the Automator app is another interesting way to screenshot your Mac’s display.
- Go to Finder > Applications and select Automator.

- Double-click Application when asked to choose a document type. You could also select Applications and select Choose.

- In the Actions tab, select Library, scroll to the bottom of the actions list, and double-click Take Screenshot.

Better yet, type screenshot in the search box and double-click Take Screenshot.

You can also drag and drop the Take Screenshot action to the blank section of the Automator window.

- In the “Take Screenshot” window, select Full Screen if you want to capture the entire screen or Interactive to capture a certain portion.

- Select the Timed checkbox if you want the screenshot captured some seconds after running the automation. Specify the delay duration in the “second delay” dialog box.

Uncheck the Main Monitor Only option if you have another monitor hooked to your Mac and you want to capture all connected displays. Leaving the option checked will only capture your primary/main monitor when you run the Automator workflow.
- Next up, select where you want the screenshot saved. By default, Automator saves screenshots to the clipboard. To save it elsewhere on your Mac, expand the Save To drop-down option and choose the storage destination.

- Select Run in the top-right corner to try out the automation.

- Afterward, press Command + S to save the automation. Alternatively, select File on the menu bar and select Save.

Ensure you save the workflow with a descriptive name that’ll allow you to remember its function, especially if you have multiple Automator workflows.
- Head to the folder you saved the Automator workflow and double-click the app to launch the screenshot workflow.

That’ll immediately capture your entire screen and save it to the set location. If you choose an interactive screenshot, you’ll be prompted to select a window/app or a portion of the screen you want to capture.

We recommend pinning the Automator app to the Dock for easy access. Now you can proceed to capture screenshots with a single trackpad or mouse click.
2. Quit All Applications
You can also create an Automator app shortcut that closes all applications (or selected apps) at the click of a button. This is a lot better and faster than manually closing multiple apps when you need to shut down your Mac or free up memory.
- Open the Automator app and select Quick Action as the document type.

- In the “Actions’ tab, expand the Library folder, select Utilities, and double-click Quit All Applications in the sub-category.

- Move the Quit All Applications window to configure the workflow. Ensure you leave the Ask to save changes box checked, so you don’t lose unsaved data.

That’ll prompt Automator to display a confirmation pop-up asking you to save all changes when you run the quick action.
- If there’s an app you want to keep open when you run the quick action, select the Add button to add the app to the “Do not quit” exemption.

You can select the Add current applications button to add all currently active apps to the exemption list.
- Press Command + S to save the quick action. Or, select File on the menu bar and select Save.

- Give the quick action a descriptive name, select a storage location/folder, choose Application as the “File Format,” and select Save.

Your Mac will automatically close all active applications when you open the shortcut. For apps with unsaved work or data, you’ll get a notification to save your files before closing the app.
3. Set and Apply a Fixed Computer Volume
(Almost) everyone has a “perfect volume level” where the sound output (or input) is neither too low nor too high. Depending on the time of the day, mine is between 50-60%. If you share your Mac with other people and they always mess with your sound settings, you can reset volume output and input to your preference at the click of a button.
That’s a better alternative than heading to the System Preferences every time you need to change volume settings.
- Open Automator and select Application as the Document type.

- In the “Actions” tab, select Utilities in the “Library” folder, and select the Set Computer Volume.

- The tools will capture and display your current volume settings in the bottom window. Adjust the sliders to your preference and press Command + S to save the changes.

- Launch the app you created whenever you need to reset your Mac’s volume settings to your preferred levels.

4. Set Music Volume
You can also create an Automator app that sets a volume specifically for the Music app. So if you have a preferred volume for listening to music in the morning, here’s how to create a shortcut that reverts music playback volume in the Music app.
- Launch Automator, select Applications as the document type, select the Actions tab, type music volume in the search bar, and select Set Music Volume.

- Adjust the slider to your preferred volume level. Or, select Current iTunes Volume to adopt the current volume output level in the Music app.

- Press Command + S to save the Automator app shortcut. Make sure you give the app a descriptive name and save it in a location you can easily access or remember. Select Save to proceed.

That’s it; macOS will adjust the Music app’s volume whenever you launch the “Set Music Volume” app. When you open the app for the first time, you’ll get a prompt to grant the Automator shortcut access to “Music.” Select OK to continue.

5. Combine PDF Files
macOS has several built-in tools for merging PDF documents into a single file. However, the Automator app is quite fast, and it provides more options and styles for merging PDF documents.
- Open Automator and select Quick Actions as the document type.

- Type pdf in the search bar and select Combine PDF Pages.

- Select how you want the PDF pages combined. Appending pages will add all pages of the secondary PDF document to the end of the primary PDF document without rearranging the page order. Say Document 1 has 5 pages while Document 2 has 7. The resulting PDF document will have 12 pages—the first 5 pages from Doc 1 and pages 6-12 from Doc 2.
Shuffling pages, on the other hand, will create a new file with pages from each document in alternating order. That is; page 1 from Doc 1, page 2 from Doc 2, page 3 from Doc 1, page 4 from Doc 2, etc. You get the drift.

- Next, expand the “Library” folder on the sidebar, select Files & Folders, and double-click Move Finder Items.

- In the “To” drop-down section, select where you want the resulting PDF file saved.

- Press Command + S, enter a descriptive name in the dialog box, and select Save.

To use the Quick Action to combine or merge multiple PDF files, select and control-click the files, select Quick Actions, and select the Automator action you created.

Automator will combine the files based on the combination method you chose (in step #3) and save the resulting PDF document in the specified location.
Modify an Automator App or Quick Action
You can always edit the workflow/instructions assigned to a Quick Action or Application created via Automator.
Edit Quick Actions and Automator Apps
- Open Automator and select Open an Existing Document.

- Navigate to the folder where the item is located and select the Quick Action or App you want to edit. Select Open to proceed.

Make adjustments to the Quick Action or App and press Command + S to save the changes.
If you can’t find the location of a Quick Action, go to System Preferences > Extensions and check the Finder or Touch Bar categories on the sidebar. Control-click the Quick Action and select Show in Finder.

Double-click the action you want to edit and change the configurations in the Automator app.

Make Tasks Easier
The Automator app has hundreds of customization options, all of which we cannot possibly cover in this post. You can use Automator to bulk rename files, save images from webpages in Safari, and lots more. Take a tour of the Automator app, explore the automation options/types, and check for everyday tasks you can automate.
By the way, we created and tested the automation options in this tutorial on a MacBook Pro running macOS Monterey. If you don’t find any of the Quick Actions or Apps mentioned above in the Automator app, update your Mac and check again.