IFTTT和Siri Shortcuts等自动化工具是简化日常任务的流行选项,但MacOS长期以来一直为此提供工具。除了高级用户之外, Automator(Automator)并不为任何人所熟知,但如果实施得当,它可以处理细节并帮助消除日常任务中的乏味。
Automator不需要编程技能即可设置。只需将相关技能拖放到工作流程中即可。以下是一些您应该检查并安装的最佳脚本。
1.清理你的下载文件夹
下载(Download)文件夹很快就会变得杂乱无章,尤其是在您经常下载照片或文件的情况下。仅 zip 文件和安装包的数量就可以快速增加。值得庆幸的是,有一个简单的解决方案:Automator设置将早于某个日期范围的文件移动到垃圾箱。
Automator 一开始可能会让人觉得有点不知所措,但实际上它比看起来要容易得多。首先(Start)打开程序并选择新建文档,(New Document, )然后选择文件夹操作。(Folder Actions. )从那里,选择Find Finder Items并将其拖到右侧的空白屏幕中。
单击Options 选项(Options)卡并选择Ignore this item's input。如果您不这样做,它会立即将所有文件移入垃圾箱。选择将 Finder 项目移至废纸篓(Move Finder Items to Trash)并将其拖到“查找 Finder 项目”下方。(Find Finder Items. )
设置此操作后,它会自动将任何超过 90 天的文件移入垃圾箱。
2.一次重命名多个文件
macOS 倾向于以某种方式命名某些类型的文件,并且很难对它们进行排序——尤其是如果你有 98 个屏幕截图都命名为“screenshot xxx-xxx-xxx”。” 值得庆幸(” Thankfully)的是,Automator也可以顺利完成这个过程。
首先,您将在Automator中创建一个新文档。选择工作流,(Workflow,)然后在最左侧的窗口中选择文件和文件夹。(Files and Folders)将Get Selected Finder Items从中间窗口拖到右侧窗口,然后对Rename Finder Items 执行相同操作。(Rename Finder Items. )
当您这样做时,将出现一个弹出窗口,询问您是否要执行该操作并提供在重命名文件之前制作文件副本的能力。虽然您可以这样做,但它破坏了一次更改所有文件的目的。
只需在“查找(Find )”中输入要搜索的文本,然后在“替换”中输入要替换的文本。(Replace. )您可以使用其他选项,例如搜索全名、基本名称和扩展名。完成此操作后,您只需打开Finder,然后运行Automator脚本。
3.在浏览器启动时打开您(Browser Start Up)喜欢的(Preferred) 网站(Websites)
让我们面对现实吧:我们大多数人在浏览网页时都有例行公事。也许它是您喜欢阅读的网站集合,以了解您最喜欢的主题。可能跟工作有关。无论哪种方式,您都可以通过在启动浏览器时让Automator(Automator)打开您最常访问的网站来省去一些麻烦。就是这样。
打开 Automator 时,选择应用程序。(Application. )从左侧窗口中选择Internet ,然后从中间窗口中选择Get Specified URLs 。将其拖动到右侧。完成此操作后,输入您在启动浏览器时要访问的URL 。(URLs)(提示:如果您在Safari中打开页面时单击“添加(Add)”,它会自动输入URL。)
接下来,选择Display Webpages并将其拖到Get Specified URLs 下方。(Get Specified URLs. )保存Automator脚本。下次您打开Safari时,它会显示您指定的页面。
其他自动机用途
Automator是一个强大的工具,几乎可以无限使用。虽然它的范围可能令人困惑,但一些试验和错误会教你所有你需要知道的东西。您可以做任何事情,从使用Outlook(Outlook)发送自动生日祝福到将文本文件组合在一起。
(Automator)如果您设置正确,Automator可以从最重复的任务中解脱出来。拖放界面让无需编程也能轻松安排功能,应用程序右上角的“运行”按钮可让您在保存之前测试Automator脚本。(Automator)
如果它不能完全按照您的意愿工作,请调整一些设置并重试。如果它仍然不起作用,Apple有一个活跃的 Automator 社区(active Automator community),您可以寻求帮助。
The Best MacOS Automator Scripts You Should Have Installed
Automаtion tools like IFTTT and Siri Shortcuts are popular options to streamline day-to-day tasks, but MacOS has long had a tool for this. Automator is not well known to anyone except power users, but when implemented correctly it can take care of minutia and help remove the tedium from everyday tasks.
Automator doesn’t require programming
skills to set up. It’s a quick matter of dragging and dropping the relevant
skills into the workflow. Here are a few of the best scripts you should check
out and install.
1. Clean Your Downloads Folder
The Download folder can grow cluttered in
no time at all, especially if you frequently download photographs or files. The
number of zip files and installation packages alone can build up fast.
Thankfully, there’s an easy solution: an Automator setup that moves files older
than a certain date range to the trash.
Automator can feel a bit overwhelming at first, but it’s actually significantly easier than it might seem. Start by opening the program and selecting New Document, then choose Folder Actions. From there, choose Find Finder Items and drag it into the empty screen on the right.
Click the Options tab and choose Ignore this item’s input. If you don’t, it will move any files into the trash immediately. Select Move Finder Items to Trash and drag it below Find Finder Items.
Once you have this action set up, it will
automatically move any files older than 90 days into the trash.
2. Rename Multiple Files at Once
macOS has a tendency to name certain types of files a certain way, and it can be difficult to sort through them all—especially if you have 98 screenshots all named “screenshot xxx-xxx-xxx.” Thankfully, Automator can smooth out this process too.
First, you’ll make a new document in Automator. Select Workflow, and then select Files and Folders in the far-left window. Drag Get Selected Finder Items from the middle window into the right window and then do the same for Rename Finder Items.
When you do, a popup will appear asking if you want to go through with the action and offer the ability to make a copy of the files before renaming them. While you can do this, it defeats the purpose of changing the files all at once.
Just type the text you want to search for into Find and then the text you want to replace it within Replace. There are additional options you can use, such as searching for full name, basename, and extension. Once you’ve done this, you can just open Finder and then run the Automator script.
3. Open Up Your Preferred Websites on Browser Start Up
Let’s face it: most of us have a routine when it comes to web browsing. Maybe it’s a collection of websites you like to read to stay up to date on your favorite subjects. Maybe it’s work-related. Either way, you can save yourself some trouble by having Automator open your most commonly visited websites the moment you boot up the browser. Here’s how.
When you open Automator, choose Application. Choose Internet from the left-hand window and select Get Specified URLs from the middle window. Drag it to the right-hand side. Once you’ve done this, enter the URLs you want to visit when you start your browser. (Tip: if you have the page open in Safari when you click “Add,” it automatically enters the URL.)
Next, select Display Webpages and drag it below Get Specified URLs. Save the Automator script. The next time you
open Safari, it will bring up the pages you’ve designated.
Other Automator Uses
Automator is a powerful tool with nearly unlimited uses. While the scope of it can be confusing, a bit of trial and error will teach you everything you need to know. You can do everything from sending automatic birthday greetings with Outlook to combining text files together.
Automator can take the tedium out of the most repetitive tasks if you set it up correctly. The drag and drop interface makes it easy to arrange functions with no programming skills, and the “Run” button in the upper right corner of the application lets you test the Automator script before you save it.
If it doesn’t work exactly as you want it to, tweak a few settings and try again. And if it still doesn’t work, Apple has an active Automator community you can ask for assistance.