

In our Text action, type “The Rocket Yard”.Ħ) Maintaining our good practices, add another Comment to describe what we’ll do next - “Enter the RSS feed of the blog we’re grabbing headlines from”ħ) Now we’re going to actually start doing something! Add a URL action to our shortcut. The Text action “passes the specified text to the next action”. As before, you can either scroll through all of the various actions available in Shortcuts or just type the word “Text” into the search field at the bottom of the shortcut. The only thing we need to do here is give the variable a name - “Lines” - and then the shortcut assigns a value later on.Ĥ) Now, add another comment action and enter “Grabbing headlines from The Rocket Yard”. Tap on the search field again, and type “set variable”. In this case, we need to create a variable to capture and hold the number of lines of text to be displayed or read from an RSS feed. In programming jargon, a variable is “a symbolic name associated with a value and whose associated value may be changed”. Use this as a Siri shortcut to listen to the headlines.”ģ) Next, we need to set up a variable to temporarily hold a number for us. Tap the Comment action to edit it, then type in something like this: “Grab the latest articles from The Rocket Yard.

Using the search field at the bottom of the empty shortcut, enter the word “Comment”. So let’s start by adding a comment action.
#IOS SHORTCUTS CODE#
Let’s get started.ġ) Create a new, empty shortcut by launching Shortcuts and tapping on the Create Shortcut button.Ģ) Want to be a good shortcut scripting programmer? It’s a great idea to insert comments into your code for future reference and to make your choice of actions clear to others who may use your shortcut. When we’re finished, you can ask Siri to “Read Rocket Yard Headlines” and the five most recent headlines from this website are read to you. In this post, we’ll go through his shortcut action by action and describe what each action is doing. The Rocket Yard Siri News Reader Shortcutįederico Viticci of the MacStories website has been a fervent advocate of iOS automation for several years, and he created a shortcut that acts as a verbal news reader for your favorite website.
#IOS SHORTCUTS HOW TO#
The third article focused on creating a simple shortcut to demonstrate how to construct your own shortcuts, and today’s post provides a more complex shortcut using scripting tools as well as links to some helpful resources. The second installment focused on actions, which are the building blocks of more complex shortcuts. The first article introduced readers to the Shortcuts app by describing the purpose of the app, the user interface of Shortcuts, and general settings. We’re back for the last installment in our four-part series about the iOS 12 Shortcuts app.
