Hi this is Gary with MacMost.com.
On this episode let's take a look at using the new Personal Automation feature in the
Shortcuts app.
MacMost is brought to you thanks to a great group of supporters.
Go to MacMost.com/patreon.
There you can find out more about the Patreon Campaign.
Join us and get exclusive content.
The Shortcuts app allows you to write little scripts that can do various things on your
iPhone or iPad.
But you used to have to trigger them by tapping on something on the screen like an icon or
by asking Siri.
Now with Personal Automations you can trigger them at various times, when you launch an
app, when you change a setting, or even move to a new location.
Let's look at the Shortcuts app using the iPad because it's a bigger screen and easier
to see here in the tutorial.
We go to Shortcuts here.
We have three tabs at the bottom.
Your Shortcuts, the ones you've created.
The Gallery of samples that come with the app and the new Automation tab.
So there are two types of automation.
The one we're going to look at is Personal Automation.
These will be things that trigger right there on your device.
Let's take a look.
If we go in you can see you can trigger them for the Time of Day, when an Alarm goes off.
Travel so movement when you Arrive at a place, Leave a place, or Before you Commute to a
place.
When you turn on various settings like when you turn on Airplane Mode, Wi-Fi networks,
turn on Bluetooth, Do Not Disturb, or and this is the big one, Open App.
So this really has a lot of possibilities here.
Let's look at that for our first example.
So we go to Open App and we will select the app here.
As an example let's choose Calendar.
Don't you hate it sometimes when you open the Calendar and the last time you were looking
at you were looking at a different month, say a few months in the future or a few months
in the past.
Now it's kind of confusing because you're not looking at today.
Right.
You want it to jump right to today.
So let's make an automation that will do that.
So we'll choose Calendar here as the app and then we'll tap Next.
Now we'll Add an Action.
Now here we can add an action based on various things.
Maybe some scripting, some media, all sorts of things here.
We can search.
We also have this Apps button here.
If we tap that then it breaks down the actions by app.
So there are some Calendar actions we can use.
Let's go to that and there's a bunch of things here including the ability to Show in Calendar.
Let's do that one.
What are we going to do?
Show Event in Calendar.
Let's tap on Event and we'll say, ahh, Current Date.
That's what we want.
So Show the Current Date in Calendar.
It seems perfect.
Let's go to Next.
So this is what we've got.
When Calendar is Opened, Show in Calendar.
Now, Ask Before Running.
No, we want to have that turned Off so it just does it automatically.
So don't ask.
Then we'll tap Done.
Now we have under Automation, instead of that Welcome screen, we have one Personal automation.
So let's text it out.
Let's go Home here and let's go to Calendar.
You can see here it ran that automation up there.
It showed you really quickly.
But say if we were looking at another day in the past here and you would expect when
you go to Calendar it's going to return to that spot.
But thanks to our new automation it's going to jump to the current day.
So we always get the current day.
So nice simple automation to text things out.
Now let's do one that's more complex.
The idea here for this example is to be when you turn on Do Not Disturb, which maybe before
you go to sleep, maybe before you go into a meeting, it's going to show you any reminders
that you put in a special reminders list.
We're going to have that reminders list called Before Do Not Disturb.
I've already created it.
Let's take a look at that.
Go into Reminders and I've got Before Do Not Disturb and I have one item in there.
Okay, so the idea is I want to see those reminders so I can review them when I turn Do Not Disturb
on.
So in the Shortcuts app here I'm going to Add a new Personal Automation.
I'm going to set it for when Do Not Disturb is turned on.
Then I'm going to Add an Action and look under Apps.
There are some automations for Reminders.
I'm going to have it here Show Reminders List.
Okay, great.
Which one?
Well tap on the name of the list there and I can select it Before Do Not Disturb.
Now let's go to Next and I can set it to Not Ask Before Running and Done.
So now I've got that one there.
So what's going to happen if I bring up Control Center and I turn on Do Not Disturb.
It automatically runs that and brings up this list.
Which is great.
But I want to make it even better because what if there's nothing in this list.
I don't want it to always do this.
Only if I add something during the day to this special list so that it will remind me
when I turn Do Not Disturb on.
So let's Delete this item from it.
It's going to still work if I turn on Do Not Disturb.
So I turn off Do Not Disturb off and I turn it on again and it's going to run.
There, it's an empty list.
What's the point of that.
Let's make the automation smarter.
I'll go into Shortcuts here and I will select this one and I will go in and Edit it.
What it's going to do is do that.
But I want to test it first.
So let's get rid of this for now.
Add an Action and we're going to get the items in a list.
So select Reminders there and say Find Reminders.
So Find All Reminders.
Let's Add a filter to that and say the list has to be Before Do Not Disturb.
Great.
I don't care for sorting and I don't want to limit it.
I just want to get all of the items there.
Now I'm going to add another thing here.
I'm going to hit X here to back out of just looking at Reminders things and back out again
from just looking at Apps.
I'm going to go to Scripting.
In Scripting I'm going to get the Count of the items from this list.
So how many items are returned from this Reminders search here.
Then I'm going to go, and in Scripting I'm going to use the IF statement and say If Count,
because it takes what came from there.
If the Count, and then I'm going to say, is greater than and use zero, then what's it
going to do.
Well, then I'm going to add the Reminders action to show the Reminders list.
I'm going to make the Reminders list Before Do Not Disturb.
I'm going to drag that in here in-between the If and Otherwise.
So let's review the script here.
Find All Reminders, where.
The list is Before Do Not Disturb.
Get the Count of the Items from that result.
If the Count is greater than zero then Show Before Do Not Disturb.
Otherwise, nothing.
There's nothing in there.
So now I'm done.
I can exit Edit Automation.
Hit Done.
Now it should do nothing because there are no reminders in that list.
I'll turn Automation off and then on again.
You see it runs but it doesn't do anything.
It didn't bring up the Reminders list.
Let's go into the Reminders app and add a reminder here under Before Do Not Disturb.
We'll add one and just call it test.
Then we'll try it.
So now let's just go to the Home screen here.
I will turn Do Not Disturb off and then On again.
This time there's an item in there so it's going to show me that list.
Now I have a little handy automation to bring up this list whenever I turn on Do Not Disturb
to remind me of things that maybe I want to do before I stop getting my notifications
for messages and things.
There's so much more you can do.
You can, of course, trigger these Personal Automations in so many different ways.
But in addition to that you can also, inside the Automation, do so many things.
So under Do you can go in here and experiment with all the different things that you can
add.
Hit that Plus button and go into each of these categories.
Look through everything in try to get an idea of what might be useful to you.
Note that when you have a small script in here you can test it out using this Play button
at the bottom.
You don't have to completely exit the script to try it out.
So you can make small modifications, hit Play, and
see what happens.