Lead Image © Kirsty Pargeter, 123RF.com

Lead Image © Kirsty Pargeter, 123RF.com

Automate macOS 12 with the Shortcuts app

Little Helpers

Article from ADMIN 70/2022
By
Apple ported the Shortcuts automation tool known from the iPhone and iPad to macOS Monterey 12 to help users make their everyday work more convenient, with or without programming knowledge.

Low-code or, even better, no-code solutions are en vogue. These products are designed to enable users to automate small tasks without programming or scripts, removing the need for tedious manual work.

Apple Shortcuts are already old acquaintances on iOS and iPadOS. Whereas users formerly needed to download the Shortcuts app from the App Store manually, it became an integral part of Apple's mobile operating systems in version 14. With macOS Monterey 12, Apple has now also added Shortcuts to its desktop operating system.

Almost Identical

Apple helps newcomers with a brief introduction [1]. If you have already familiarized yourself with the app on mobile devices, you will immediately feel comfortable with it on macOS, too. Apps use Apple's SwiftUI GUI framework on both platforms and share the codebase.

Because you can store your individual shortcuts in iCloud, many of your automation shortcuts can be used across both platforms – as long as you use actions that exist for both macOS and iOS. If the feature set is not enough, you can use AppleScript, JavaScript for Automation (JXA), or shell scripts to extend the shortcuts on macOS – but more about that later.

Importing Automator Workflows

Shortcuts is not Apple's first attempt to automate macOS. The Automator app has been an integral part of the operating system since Mac OS X 10.4 (Tiger), which was released in 2005. In recent years, however, Apple has not seriously maintained this application. In direct comparison to Shortcuts, the user interface seems pretty much outdated, and the learning curve is steeper. For the time being, the two apps coexist, but Apple is not expected to continue support permanently for both automation tools in parallel.

If you have already created workflows in Automator, you can export them to a *.workflow type file and try to import them into the Shortcuts app [2]. Unfortunately, this method does not always work. In our lab, Shortcuts did not want to adopt a simple workflow that renamed and enumerated files and, for want of a meaningful error message, did not reveal what caused the failure.

If you are new to macOS automation, you can boldly go straight to Shortcuts, because it handles many of the actions specific to the operating system and helps integrate scripts from Automator.

Sharing over iCloud

When you launch Shortcuts from the Launchpad, the app comes up with a two-part layout featuring a navigation bar to the left and a main area that displays the available shortcuts as tiles. Before I turn to working with Shortcuts, I'll first take a look at the global options in the Shortcuts | Preferences menu. In the General section, iCloud synchronization is enabled by default, which ensures that you can use your shortcuts on all your devices.

iCloud has the option of sharing your efforts with the world. The Shortcuts app generates an iCloud link for each shortcut, and you can share this in any way you want (e.g., by AirDrop, email, or text message). Beware, though, this link is public. Anyone who discovers it can download and use your shortcut in the Safari browser.

Alternatively, you can use File | Export to save a shortcut as a file with the .shortcut extension, which you can then choose to pass on to the whole world or only to people you know [3], in which case, the contact information of the respective recipients must be in your Contacts on macOS. Importing a shortcut like this takes you back to the General tab in Preferences because you need to enable the Private Sharing option there [4].

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=