An Introduction To Shortcuts Automation In macOS Tahoe

MacOS Tips
1 follower
#macOS #MacTips #MacOSTips #AppleTips #MacBook #MacBookTips #Productivity #Workflow #Shortcuts #KeyboardShortcuts #MacShortcuts
AI GeneratedยทMay contain errors
Hi this is Gary with MacMost.com. Let's take a look at using shortcuts automation.
So a new feature in the shortcuts app in macOS Tahoe is the ability to add automation. This
means that you could have shortcuts that are triggered by actions or events. The way to set
this up is to go to the shortcuts app. Then look in the left sidebar here for automation. You can
go there and create an automation using the plus button at the top right. You could also just go
to file and new automation. So the first thing you need to do is set the trigger for this shortcut.
So there's a lot of them here. For instance the easiest one to understand is time of day.
Select that, go to next, and you see you could set it for a specific time of day or sunrise or
sunset. You could have it repeat daily, weekly, or monthly. If you choose like weekly you could
choose the days of the week here or monthly you could have it starting on a certain day of the
month. You could also have it triggered when an alarm from the clock app goes off. If you look
here you can have it when it goes off, when you snooze it, or when you stop the alarm. And you
could choose the alarm by name. So you'd have a specific alarm that triggers an automation and
then you could change that alarm and turn it on and turn it off as you like. But there are also a
lot of events here that could happen that could trigger an automation. For instance when you get
an email or a message from a specific person with text in the subject, something in a folder changes,
when something in a file changes, when you connect or disconnect an external drive,
also when wi-fi is connected or disconnected, and the same for a bluetooth device. You can also
have an event triggered when a display is connected or disconnects, when stage manager is turned on
or off, when an app is launched or quit, and you can also have it triggered when you simply turn on
or off a focus mode. So for instance do not disturb, you can have that when it's turned on,
when it's turned off, both, and have the actions run then. If you find these videos valuable consider
joining the more than 2,000 others that support MacMost at Patreon. You get exclusive content,
course discounts, and more. You could read about it at macmost.com
slash patreon. So as a very simple example let's use the app trigger here and let's say
that when a certain app, let's choose it here, and I'm going to search for it and I'm going to say
Keynote, when Keynote is opened then run after confirmation, not immediately, but you'll get a
notification and you can choose to run it or not. And then what we're going to have happen is when
Keynote is opened we're going to create a new shortcut here with this button like that and then
we're going to add some actions to it. One of the things I want to have happen when I launch Keynote
is I want some apps quit so they're not running and I don't accidentally switch to them while I'm
giving a presentation. So I'm going to look for app here and then I'm going to choose quit app
and the app I'm going to choose in this case is mail and I'm going to add that. I'm going to add
another one quit app and choose messages and have that one quit as well. And then also when I start
a presentation I sometimes forget to set the focus mode to do not disturb. So I'm going to search for
focus here and say set focus to turn and I'll use do not disturb but I could use another focus mode
if I want. Turn it on and then I can set it to until turned off or a specific time or try leave
this location or ask each time which one I want. So I'll actually do ask each time and then I'll
close it here. Now notice I've got messages in mail running and also notice I'm not using any
particular focus mode right now but I'm going to launch a keynote and when I do you can see I get
this notification here asking me if I want to run this shortcut. Yes I do and I then get prompted
because remember I had it ask me when I want to turn off the do not disturb mode. So I'll say
do it until I turn it off. Done. Notice that messages and mail quit and now I have do not
disturb turned on. So now I have a handy way to set up my Mac when I'm about to give a presentation.
If I was just working on the presentation I could have chosen not to run it but just dismiss the
notification instead. Now let's go back into shortcuts and see how you edit this. If you go
to automation here you'll see it and you can select it and if you double click it will take
you into the shortcut itself. So I can now change which apps are quit maybe I can remove one of
these or add another quit or some other action. If you need to change the automation trigger itself
then instead of double clicking here control click right click or two finger click on a trackpad
here and then go to edit automation and now you can change which app this is triggered by or maybe
change it from run after confirmation to just run immediately. Let's look at some other examples.
So I'll start a new automation here and I'll go down to these focus modes.
Let's say that when I turn on my studying focus mode I wanted to do certain things and just run
it immediately like that and it gives me some suggestions here. For instance set volume. I'll
take that first suggestion and I'll use it and it's going to start a new shortcut here and it's
going to have that action in there. Let's go and say you know I want it to go all the way down to
10 percent and then in addition to that maybe I can also have it quit an app like maybe safari
then I could add whatever else I want here. Now this will trigger when I switch to the studying
focus mode. I've got my sound let's set it halfway like that and I've got safari running here. So if
I go and switch to studying you could see safari quits and then if I check the volume you can see
volumes automatically been set to 10 percent. Now if you're on a macbook you may notice there are
more triggers and that's because you've got a battery and you can connect and disconnect power
to your macbook something you can't do on my mac studio. So here on a macbook if I go and set up an
automation you could see I've got battery level and I can have something triggered when it reaches
a specific battery level rises above falls below and so on. I also can set it for when the charger
connects or is disconnected. A common problem you run into for instance is sometimes with magsafe
you accidentally disconnect the charger and then you don't realize it but your macbook is now losing
power. So you can set it up like this that when the power is disconnected run immediately and
we'll take this first suggestion right here and have it speak text. This is a handy little action
because you can have it say whatever you want. So you could say you know power disconnected you can
click here and then you can turn off wait until finish. You don't need the shortcut to pause you
just need it to just send that text to audio and then you could do rate pitch language and set it
to the voice. So I've got a lot of voices here but I'm going to use the Siri voice right here. So now
if I pull the magsafe cord off of my macbook it will run. Power disconnected. Here's another example
that involves receiving a message. So when you use this you can set a sender or just leave it blank
for any sender. Then I'm going to have it when it contains something in the text. So just a bit of
text like that have it run immediately and then I'm just going to have it do kind of the same
thing as before adding a speak action here. So speak text. I just wanted to speak the actual
message out loud. So the way to do that is here where you have text I'm going to control click
two finger click or right click. Insert shortcut input. Shortcut input is an object. It's this
message object. You want to get a specific piece of information from the message. To do that what
you need to do is make sure you've deselected the text there. So select something else. So if not
select it then double click here and then you get this shortcut input selector here. What I wanted
to use here is the content of the message. So now when I choose that you can see this changes to
content and you can see now I could set the voice and all of that. I'll turn off wait until finished.
Now let's test it out. Notice I don't have the messages app running. So let's get this message
sent from a different account and the message will come and should speak this particular message
because the words good news appear in the content. So the idea here is maybe you get text
messages from some sort of automated system like maybe you sell products on some sort of online
marketplace and get a text message every time you make a sale. You could have this triggered by text
that's always in those messages. Let's take a look at one more example. This one I'm going to have
triggered when a folder changes contents. Which folder? Well let's choose the downloads folder
and when the contents of the downloads folder change because a file is added to it then we're
going to run something immediately. And what are we going to run? Well we're going to create a new
shortcut here and you can see it receives the folder change summary as input. So we can use
this data for something like for instance figuring out what file was just added to the downloads
folder and then do something with it. So here's my downloads folder it's empty right now but what
I'm going to do is I'm going to add a new folder inside the downloads folder called pdfs and the
idea is that whenever a pdf is added to the downloads folder because I downloaded it say
in Safari it is moved into this pdfs folder in here. This pdfs folder could be in your documents
folder or somewhere else. I'm just going to put it in the downloads folder so we can see it easily
and it acts kind of as organization for the downloads folder. So let's go and get the folder
input which should be the file that was added and look for an action to move that file and here it
is. So I can double click on it and it says move the file to what. So first let's set what file to
move. I'm going to not click here because it's going to ask me to specify a file instead I'm
going to control click right click or two finger click and change this to shortcut input but
remember shortcut input is an object so what we want to do here is click it once and then look
and see here that the object is actually the folder change summary information about what's been
changed instead let's go and select added files so this should be a list of added files but this
gives us a clue that there might be more than one so what we're going to do is we're going to escape
out of that and delete this and instead use repeat and say repeat with each so repeat with the items
here I'm going to click there and say shortcut input click again and then say added files like
that and now it's going to repeat through all of the added files for the input so that's going to
repeat through all the added files now we want to check to see if each item is a pdf so I'm going to
look for if here and I'm going to add if here if condition if and I'm going to change this to the
file extension so the file extension of the repeated item is and then set that to pdf
if it is a pdf now we'll use move and we'll say move file move the repeat item to what well we're
going to set it to that pdf folder there so now with this set up anytime a file is downloaded
here that's a pdf the shortcut should trigger and move it into this folder let's test that out
by going to this page here at macmos and there is actually a download here for a keyboard shortcuts
pdf let's click on that and download it you can see it appeared there briefly in the downloads folder
and then it went into this pdfs folder here let's look at it in list view and we could see it right
there so i'm just scratching the surface here there are lots of different triggers that you
could use and there are a ton of different actions you can take with the input from those triggers
you can play around and experiment more with shortcuts to see how these automations can help
you hope you found this useful thanks for watching if you like this video click the thumbs up button
below to let me know i publish new tutorials each weekday hit the subscribe button so you don't miss
out
