Scriptable Tutorial Part 3 – Hey Siri

By | 28.12.2020

Another exciting thing about Scriptable is the ability to easily connect your own scripts to Siri. To stick with our Instagram example: Wouldn’t it be great if we could ask Siri how many followers we currently have? And maybe she would even answer?

Hey Siri – listen to me!

First of all, we can call up our existing script via Siri. The best part: It doesn’t require a single line of program code.

To do this, we first switch to the settings of our script. When you open the script, you will find the button for the script settings at the bottom left:

Jump to the script settings

In the settings you will find the menu item Siri Shortcut:

If you press this, you jump directly to the right place in the shortcut app:

Configuration of the voice command

All you have to do here is to enter the voice command for Siri. In my example, I can now start my script using Hey Siri, how popular am I ? and get the result, my current number of followers, displayed directly.

Hey Siri – talk to me!

Of course, it is even nicer to have Siri answer directly. For this purpose, Scriptable provides you the class Speach with the only method speak to let Siri speak. Of course, our script should not always speak, but only when it is called via Siri. You can therefore use the config object to query whether you have been called by Siri. The complete call would therefore look like this:

if (config.runsWithSiri) {
  Speech.speak("You are very popular, you already have " + count + " follower!");
}

So it is not that difficult to integrate into Siri with a script.

Note : There currently seems to be a problem with the speak method, in individual cases Siri simply remains silent. This seems to be related to the language settings of the smartphone, this problem should be fixed by Scriptable soon.

In conclusion

Great suggestions for further scripts can be found here:

https://www.scriptables.de

On this page you will find countless example scripts that you can use directly and use as suggestions.

The following page is available for all kinds of questions:

https://talk.automators.fm/

Hundreds of examples can also be found here, just waiting to be tried out. You will also be happy to help with problems here.

If you like my little scriptable tutorial, I would be happy about a small tip:

https://www.paypal.com/paypalme/markmescher/2,99

You are of course free to decide how big the coffee should be 🙂

If you have any suggestions for this tutorial, I look forward to your comments!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.