Hi, this is Gary with MacMost.com. Let me show you how to create
QR codes using Shortcuts on your 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, of course, we all know what QR codes are. The last few years have taught us that they are those
little digital images you can see various places, like in restaurants, when you can get the menu by
pointing your iPhone's camera at the QR code. You can easily create your own QR codes for
any website or webpage that you have. So if you have a business website or a personal blog or
anything like that you can create a QR code for it. Even the address to a twitter or instagram
account can be turned into a QR code. Anything you can bring up in the Safari web browser
can be made into a code and you can do that with the Shortcuts app.
Let's create a new shortcut here and we're going to search, right away,
for QR right there and Generate QR code comes up. So how do you use this. Well, Generate QR
Code from Text will turn any text, like abc, into a code. Just Run and this is the code for
abc. Now that doesn't help much. What you need is a URL. So you could type in a URL, like this,
and run it and that's the QR code with that text in it. If you point a camera at that code it's
going to come up and clicking on it will take you to that webpage. So already this is pretty useful.
What would be better is if it actually made a QR code for the webpage you are currently viewing.
So, for instance, if I'm in Safari like this it would be great to be able to create a QR code
for this page. Then I could go to any page I want and quickly create a QR code for that one
and then use it somewhere. Use it in something I'm going to print or email or whatever.
Let's start off by searching for something that would get the webpage location. Now what we can
do here is get the current webpage from Safari. Now you can also set this up as a QuickAction
or Service to use in Safari or when you've selected a URL to turn that into a QR code.
But I find it is a lot easier if you just go with whatever the front-most page is in Safari,
whatever the URL is that is showing there. That way you could bring up the page in Safari
and use this from the Menu Bar, having it pinned in the Menu Bar or any other
way even in the Shortcuts app. It just will get that current page in Safari and use that.
Now let's get rid of this right here and I'm going to Control Click on it. Insert variable,
Select the Variable, select this. So now it's going to get the current webpage from Safari.
It's going to feed that into generate QR code from. Now let's give it a name.
Also some place to output to because we're not always going to be running it here in
the Shortcuts app. So if I search for Quick, I get Quick Look. Now the output will actually
go to Quick Look. So now when I run it here you could see it appears there in Quick Look.
I can do various things with it using the Share Menu. Let's see how this looks in Safari. Let's
go to another page here, like this one. Let's say I want to use it here. I can click there and so
I say Pin to Menu Bar. There it is. It's going to output the result to Quick Look and there is that.
I can share it using this Menu here. I could also open in Preview and then I could simply Command
C to Copy. With it copied I could do something really easy. Like, for instance, if I'm making a
flyer in Pages I could just Command V and paste it in. Resize and add a QR code to a flyer.
Another way to go instead of using Quick Look you could just Search for Clipboard
and Copy to Clipboard. So now all it's going to do is get the current webpage.
It's going to generate the QR code and then it is going to copy it to the Clipboard.
When I do that it runs. It's copied to the Clipboard right away. So now in Pages I can
paste it in there. So if your main goal is getting it to the Clipboard quickly so you
can use it in documents then you may want to go with something really simple like this.
Now let's say I want to Save this as an image file instead of having to do something with it right
away. Well, what I can do here is just use the Save command, Save and then Save File, and it will
Save QR code. Show More will show me the password to save. Let's turn that off and instead it will
save it and I click here to replace the Shortcuts folder with something else, like say the Desktop.
Now it is going to save it to the Desktop. Now let's get rid of this Quick Look here. Now when I
run it the first time it is going to ask me to give permission and now you could see here I've
got it on the Desktop. It has a very generic file name. So let's fix that with a Rename.
Rename File to what. Well, let's go ahead and get the details of the webpage. I'll look for Details.
You can get the details on a Safari webpage. Let's go and put that right up here. Get page
contents is not what we want. What we want is the name of the page. That would be handy to rename
the file. So I'll click here. Control click on it actually. Select variable. Use the name there. Now
when I run you could see how it takes the name of the page and uses that as the name for the file.
So if I were to go to somewhere else and then Create QR code. It runs and you see I get the
name of this page. I can generate it for any pages I want and you could see how it creates one for
each. So you could easily, instead of sending this to the Desktop, send it to a special folder
and then fill it up with the QR codes you need and know where each one goes because they are
named properly. Now you can use them in all sorts of documents to make it easier for people to grab
a URL and get to a page using their phone. Hope you found this useful. Thanks for watching.