Hi this is Gary with MacMost.com.
Let's take a look at the basics of using Automator on your Mac.
MacMost is supported by viewers just like you.
Go to MacMost.com/patreon.
There you could read more about the Patreon Campaign.
Join us and get exclusive content.
So if you've never used Automator before it could be a little intimidating.
So here's an introduction to getting started with Automator.
I'm going to launch Automator using the Spotlight menu.
So Command Space and then search for Automator.
Then select it and hit Return.
When you start Automator or create a document in Automator you're faced with a decision.
You have to choose which type of document you're creating.
There are eight different types.
You can create what are called Workflows in any one of those.
That's your script for actually doing things.
The first type is just called a Workflow.
That's a document that you would open up in Automator and you can run it in Automator
but you need Automator to do it.
The second type, Application, is a stand alone file.
So after you create it you can actually just run this application and it will run the workflow.
You don't need to run Automator to use it.
You also can drag and drop files onto an application which can be handy.
The third type is Quick Action which used to be called Services in earlier versions
of macOS.
Quick Actions will appear in context menus, the menu bar here under Services, and you
can also find them in the Finder in some cases.
There are various other types of workflows that will appear in different places.
We're going to start with the simplest kind,.
Just a regular workflow.
So we'll be creating this in Automator and also using Automator to run it.
Now the Automator window has two parts.
On the left side you can see a library of what are called Actions.
Actions are the building blocks of a workflow.
On the right side you can see the workflow.
Your Automator document.
To create a workflow you basically drag and drop actions from the left to the workflow
on the right.
If you don't see your library here on the left you can click this button to Hide or
Show it.
You can select Library here and you'll see a list of all of the different Actions.
If you expand Library you can see all these different categories.
You can select a category and only see what's in that category.
There's a handy search field here at the top.
It will only search whatever it is you have selected over here on the left.
Note that a lot of these Actions are only here because they have certain apps installed.
For instance here's an action that's part of Microsoft Word.
You would only see that if you had Microsoft Word installed.
So everybody is going to see different things here.
There's a default set of Actions that just come with macOS.
Now we're going to build a sample script that's going to select an image file and then resize
it and save that out as a new copy.
This could be handy in situations like where you need to upload images to a website but
it won't accept full size images.
So you want to shrink them first and upload the smaller version.
So I"m going to start off by going to Files & Folders and the very first item here is
Ask for Finder Items.
Notice at the bottom there's a description of this Action.
It tells you what it will do.
It inputs the result.
All sorts of things.
If you don't see this there's a button here that will Show the description for each action.
A lot of work in Automator involves simply searching through these.
Getting to know them so you can select the right action to use.
Now I can drag and drop this action over here or I could have just double clicked it and
it would put it there.
You can see there's some things I could fill in.
I could select where the file dialogue is going to start at.
In this case it will start at the desktop but I can select another folder for it to
start.
I can also say whether I want to select files, folders, or both and whether or not I can
allow multiple selections.
So selecting many files.
I'm going to stick with just one type of file here.
Before we go any further I'm going to Save this workflow.
So I'm going to do File, Save, and I can save it anywhere I want.
I'll save it here to the desktop.
I'll call it Test.
Now let's test it out.
It's important to test your workflows each step of the way.
In this case all it should do is ask for a Finder and do nothing with it.
But that's fine.
I want to make sure this part is working before I go to the next part.
So I'm going to hit the Run button here.
You can see it prompts me to select a file.
I'll select this image file.
I can hit Choose to choose it and you can see now the workflow is complete.
I get a green checkmark there.
I can click Results and it could show me the results.
In this case it shows me the file that was selected.
So I know this first part is working.
So let's move on to add the next thing.
So the next thing we want to do is create a copy of this.
So I could go and look for the Copy Action which is actually right here.
But searching for it is a lot easier.
So I find Copy finder items or Duplicate finder items.
Let's see which one we should use.
If I select Copy it says this action copies a specified finder items to a specified location.
This action creates duplicates of files or folders.
So duplicate is probably the simpler one because we don't want to have to select a location.
We just want it to duplicate the file exactly where it is.
So I'll drag and drop that next.
Notice there's a little link here.
The result of this action flows into the next one.
So this should be a simple thing here where now I can select a file and duplicate it.
Let's try running it.
I'm going to select that file.
Choose and now it's going to ask me for permission.
macOS Catalina is very good about making sure that things like scripts and new applications
have to ask permission before they can access different places on your hard drive.
So we'll hit OK.
We only need to do this the first time.
Now you can see it created a copy here.
So I've got the copy of that original file.
So far so good.
Now let's resize it.
Resizing is probably not going to be something under Files & Folders.
That's probably going to be something under Photos or maybe somewhere else.
Let's go back to Library in General so we can select the entire Library of Actions.
You can see I cleared the Search there and let's search for things like resize and we're
not going to find it here under resize, at least not by name.
But we can see that there are two scale images actions.
If I actually search for Scale I could see there's actually even more.
We can see one here that is from Apple.
So it's like a default macOS one.
It's not one added by a third party app.
This action resizes the specified images.
So this seems to be what we want.
Let's drag that here.
It's going to then prompt us and say hey this is going to change the current file.
Do you want to copy the items, make a duplicate of them, so it's not changing the original?
I don't want to do that because I'm already duplicating them.
So I'm a bit ahead of the game.
Now we're going to scale images and we can choose to size or by percentage.
So we can say let's do it to size and let's make it 640.
It's going to be 640 width and the height will adjust for that.
So it takes the original file, duplicates it, feeds that duplicate into this scale image
thing here, which should scale the new file.
I'm going to run this script.
I'm going to select the file and Choose.
You can see now I've got a new file there.
Let's take a look at it.
Move this over here and you can see that this file here is 2000 some pixels wide whereas
the copy is 640 wide and 502 high.
So success.
We created a useful workflow.
So we could save this and anytime we want to do this we can open it up in Automator.
Then run it . Select the image and then will run our script.
But what if we used other types of documents you can create in Automator.
Let's create a new Automator document here and let's create an Application instead.
When I do that is says Application receives files and folders as input.
So we already know what the file is.
Now all we need to do is duplicate it.
So I'll create Duplicate Finder items.
You can see the input here flows into that first action.
Now let's scale and choose the scale images.
So I'll do 640 and now I just have two steps instead of three steps because as an Application
it will already have an input.
So let's Save it.
I'll do Command S and I'm going to save it and call it Test2.
You can see it's going to be dot app.
I'll do Save and now we can see here is that we've got this application.
The cool thing about it is I can drag and drop onto it.
So let's Delete that file from before and now take this file and drag it on and it will
take that as an input.
It's going to ask for permission the first time just like before.
Now you can see it creates this new file by drag and dropping.
That's even more useful than a workflow.
Now what about Quick Action.
We can do the same thing in Quick Action.
Now we have a bunch of options at the beginning.
We could say Workflow receives the current, and it could be automatic, but let's change
it to image files.
So now we can be very specific, Only for Images.
Then we could say where, what application?
Let's say Only in the Finder.
I'll create the duplicate and scale actions here.
I'm going to Save this but notice it's not prompting me where to save it to because Quick
Actions are saved to a specific part in your User Library.
So I'm going to do resize image 640, we'll call it that.
It will Save it to this mysterious location.
Now I'm going to Hide Automator.
Quick Actions appear in a variety of locations.
So one location is if I Control click on this file here you could see I can look at Services
at the bottom and I can see Resize Image 640.
It appears right there.
I can click that and it's going to ask for permission like before and it does the same
thing as the others did.
Now I could also go and find it if I create a new finder window, let me go to desktop
in this case, and I'm going to turn on the Preview.
When I select the file here I could see what are called Quick Actions here.
If I click on More there's more Quick Actions and I could see Resize Image 640.
It appears there as well.
So I can select it there and you could see it creates the Resize Image.
A third place I can see it is to select the file and then go to the Finder, Services and
then here I could see Resize Image 640.
So Quick Actions appear in a variety of different places to make it easy to access them.
So the rest is up to you.
People that use Automator a lot first take the time to look through all of the different
Actions.
So look in your Library here.
Look through each one of these.
Read the descriptions and see what they do.
It's not an effective strategy to just come up with something in your head that you think
Automator might be able to do and then try to figure out how to do it.
That doesn't usually work because Automator could only do a limited number of things.
What works out much better is to actually study what's in here.
Then once you understand what Automator can do ideas for workflows may come to you that
can help you be more productive.