Hi, this is Gary with MacMost.com. Today let's
take a closer look at the Shortcuts App for the Mac.
MacMost is brought to you thanks to a great group of more than 1000 supporters. Go to
MacMost.com/patreon. There you can read more about
the Patreon Campaign. Join us and get exclusive content and course discounts.
So macOS Mojave is going to bring the Shortcuts App. It's been around for awhile in iOS
to the Mac. It's not going to completely replace Automator. Automator can still do
some things that the Shortcuts can't. But there's going to be a lot of overlap. So
I thought it was a good idea at this point to take an early look at exactly what it's
like to use the Shortcuts App on the Mac. This is the very first beta so it's still pretty
buggy but you can get the general idea of how you use Shortcuts to create automations on your Mac.
The Shortcuts App here has got a sidebar with different categories of the shortcuts
that you create and a Gallery, and then a main area. Let's create a shortcut here.
I'm going to start by going to All Shortcuts. It's going to list all my
shortcuts and there's a Plus button at the top. I'm just going to do some simple examples here.
So let's create something that merges PDF's. So we'll call this one Merge PDF Files. Then
I need to have some input from this. The idea is that I want this to be a Quick Action where
you select some PDF files and activate this so that it merges the one you've selected.
So I'm going to go to the Settings here and then I'm going to set this as a Quick Action
with Services Menu checked. Now here I can set it to receive any input from Quick Action. So
I can select specific kinds of things to use like only images or files. But I am just going
to leave this as any for this simple example. Then what to do if there is no input. You can actually
have it ask for files if there is no input. So I'll just leave this as Continue right here.
Now let's go to the Actions. I can search for Actions or I could browse through the collection
here to look for things. So let's search for PDF. I can see here that there is Make PDF.
I'm going to double click that to add it. Then it's going to make PDF from what.
So I'm going to click here and I can select Shortcut Input. So the files that come
in are going to be made into a single PDF. Now we need to save the file so let's look for Save
and here's Save File. I'm going to double click to add that.
Ask where to save. Yes. Overwrite if file exists. No. Let's force a new file name. So now that I
have that done I can Close it. If I look here under Quick Actions I should see it listed.
So there it is. If I want to go and edit it again I can just double click on it and there it is.
Now let's go and try to use it. So I've got a folder here on the desktop with some PDF's in it.
Let me select all of these. Now I'm going to go to Finder and then Services and there's Merge PDF
Files. Let's go and try that here and it's going to prompt me for the location to save it. So let's
go back into that Saved folder. Open it up and you could see it creates a new file here that's the
combination of all of those. Now I should be able to select those files, Control Click, right click
or two-finger click on a track pad and under Quick Actions see it here. If I don't see it there right
away. But if I go to customize then I'll see it here and I can select it and now that it's checked
it will show up under Quick Actions. There it is. I'll also see it appear here in the Preview area.
So let's look at some other examples here. I've got one I created called Resize Image
Files. It does the same receive any input from Quick Actions. It also says that if there is
no input then ask for files. You can click here and have it ask for different things to select.
Then it's going to do an Ask For. So ask for is an action right here. You can click this I button
here to get information about each action. So here this is going to display dialogue and prompt the
user to enter something. Try a number in this case. Then it's going to say Resize and then the
Shortcut Input here to size. I can do percentage or longest edge. That kind of thing to provide
input. That provided input from this previous action. Then it's resized but not saved yet. So
let's go to Save the resized image. So everything that is passed through ask where to save and
do that all as before. The great thing is this will work for as many images as I've got going.
So, let's go to another folder I've got here and I've got some images. If I Quick Look at these
images you could see they're decent size. Let's go and select these and I'm going to Control click
Quick Actions and let's customize and let's add this. We've got to do this one time.
Resize Image Files and now I Control click Quick Actions Resize Image Files. It should prompt me
Image With. So let's make it something really small. Make it obvious that we made the change.
Done. Now it's going to prompt me for where to save this to. I'm not going to save this to the
PDF location. I'm going to save it to the Test Directory here. Right where those images were.
So there's the original image. If I Quick Look I can see it. Then if I go up one I can see there's
the smaller one. Now notice in here one of the things I did was I clicked here and I change
the color and also the icon that's used for it. So that's a handy little thing to be able to do.
Now here's one that works on something other than files. This is also going to be Quick Action. It's
going to receive text. So you can see I have all these things that it can receive here. In this
case I've only selected text. Then if no text is selected or maybe you wanted some other way,
it's going to ask for text. Then it's going to use Make Spoken Audio. So that's something
that is an action here in Shortcuts. Then it's going to Save that and do the same thing. So
let's say now I have some text in any app and I select it. If I Control Click on it
under Services I should see this appear here. There's text to spoken audio. When I do that
it's going to prompt me now for a location to Save this. So I'll save it to the Desktop.
You could see it saves it here. Gives it a name and now that's an audio file.
Now while we're here I've got another Action I've created. Something called Response.
So this is a little bit different. This is a Shortcuts version of something I made in
Automator awhile ago. What it does is it prompts you for some information and then it formulates
this response based on that information. Now it's going to receive no input from Quick Actions but
it's going to be accessed as a Quick Action. Then it's going to ask you for text name and
also ask you for text days to respond. It's going to store those in variables. I shouldn't have to
store those in variables. I should be able to do ti in a better way. But as I said Shortcuts is a
little buggy right now. So I had to resort to doing this. So I'm creating a variable called
Name and a variable called Days. Then I'm running a JAVAscript automation. So that's right. You can
actually under Scripting here, find the ability to add AppleScript, JAVAscript, or Shell Script into
your Shortcuts. That's a very powerful feature of Automator that Shortcuts has right off the bat.
Then it will use the JAVAscript to call Choose From the List to have to make a choice out of
three items. Then it's going to put that into a variable. Then it's going to create a list from
those variables, Name, Days, and a variable called Otherwise. Then it's going to use some JAVAscript
again to put that together in a piece of text and output it. So if we try that out in TextEdit
here. I'll Control click and choose response that appears there as Quick Action. I'll type the Name,
I'll Click Done, Number of Days I'll leave to default, and then I'll choose one of these
and hit Okay. You can see it puts together the response just like it did
when I used pretty much the same JAVAscript in an Automator workflow to get the same task done.
So here's another one I created. This one not as a Quick Action and I'm just using it as an
example of how you can do Shell Script inside of Shortcuts. So here in the Settings I didn't select
Quick Action but Keep in Menu Bar. This creates this little menu up here with Shortcuts in it.
So, here all I'm doing is run Shell Script which is a simple little task here. Run Shell Script and
you could see all it does it execute what's in there. So basically Terminal Commands in other
words. I'm just running the one called Uptime which just gives you a report of how long your
Mac has been awake. It's just going to show here, which if you look under Show Result,
all that does is give you some output. Otherwise the Shortcut would do this,
get the Uptime, but never show it to you. So, we'll just put those two things together.
So I can actually run this in the Shortcuts App here and you could see what it does.
But I could also exit from here. Quit Shortcuts completely and then go here Uptime and it's going
to give me the results. So you could see that simple command getting results here. But imagine
doing something much more complex in a Shell Script and then having it output the results
for you like that and having easy access to it right here without having to go to the Terminal.
So that's an idea of what Shortcuts is going to be capable of in macOS
Monterey. It's going to be really powerful. It won't replace Automator right away. Like,
for instance, right now there's no folder action and things like that.
But you'll be able to use it for a lot of the same things that you do with Automator.
Since you could do Shell Scripts, JAVAscript, and Action scripts in it I think there's going to be
a ton of cool things you'll be able to do with Shortcuts on our Macs in a way that's going to
be a little more accessible to people than using either Script Editor or Automator ever will.