{"id":199,"date":"2020-12-28T09:16:00","date_gmt":"2020-12-28T09:16:00","guid":{"rendered":"https:\/\/www.unleserlich.info\/?p=199"},"modified":"2021-01-03T13:03:16","modified_gmt":"2021-01-03T13:03:16","slug":"scriptable-tutorial-part-3-hey-siri","status":"publish","type":"post","link":"https:\/\/www.unleserlich.info\/?p=199&lang=en","title":{"rendered":"Scriptable Tutorial Part 3 &#8211; Hey Siri"},"content":{"rendered":"\n<p>Another exciting thing about Scriptable is the ability to easily connect your own scripts to Siri. To stick with our Instagram example: Wouldn&#8217;t it be great if we could ask Siri how many followers we currently have? And maybe she would even answer?<\/p>\n\n\n\n<h5>Hey Siri &#8211; listen to me!<\/h5>\n\n\n\n<p>First of all, we can call up our existing script via Siri. The best part: It doesn&#8217;t require a single line of program code.<\/p>\n\n\n\n<p>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:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/2020-11-14-13_01_22-Fotos-1024x191.png\" alt=\"\" class=\"wp-image-158\" width=\"315\" height=\"59\" srcset=\"https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/2020-11-14-13_01_22-Fotos-1024x191.png 1024w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/2020-11-14-13_01_22-Fotos-300x56.png 300w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/2020-11-14-13_01_22-Fotos-768x143.png 768w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/2020-11-14-13_01_22-Fotos-660x123.png 660w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/2020-11-14-13_01_22-Fotos.png 1053w\" sizes=\"(max-width: 315px) 100vw, 315px\" \/><figcaption>Jump to the script settings<\/figcaption><\/figure><\/div>\n\n\n\n<p>In the settings you will find the menu item <em>Siri Shortcut<\/em>:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Script-Settings-1024x742.png\" alt=\"\" class=\"wp-image-159\" width=\"349\" height=\"253\" srcset=\"https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Script-Settings-1024x742.png 1024w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Script-Settings-300x217.png 300w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Script-Settings-768x556.png 768w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Script-Settings-660x478.png 660w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Script-Settings.png 1125w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/figure><\/div>\n\n\n\n<p>If you press this, you jump directly to the right place in the shortcut app:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl-633x1024.png\" alt=\"\" class=\"wp-image-160\" width=\"296\" height=\"479\" srcset=\"https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl-633x1024.png 633w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl-186x300.png 186w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl-768x1242.png 768w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl-950x1536.png 950w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl-660x1067.png 660w, https:\/\/www.unleserlich.info\/wp-content\/uploads\/2020\/11\/Kurzbefehl.png 1125w\" sizes=\"(max-width: 296px) 100vw, 296px\" \/><figcaption>Configuration of the voice command<\/figcaption><\/figure><\/div>\n\n\n\n<p>All you have to do here is to enter the voice command for Siri. In my example, I can now start my script using <em>Hey Siri, how popular am I <\/em>? and get the result, my current number of followers, displayed directly.<\/p>\n\n\n\n<h5>Hey Siri &#8211; talk to me!<\/h5>\n\n\n\n<p>Of course, it is even nicer to have Siri answer directly. For this purpose, Scriptable provides you the class <em>Speach <\/em>with the only method <em>speak<\/em> 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:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if&nbsp;(config.runsWithSiri)&nbsp;{\n&nbsp;&nbsp;Speech.speak(\"You are very popular, you already have \" + count + \" follower!\");\n}<\/code><\/pre>\n\n\n\n<p>So it is not that difficult to integrate into Siri with a script.<\/p>\n\n\n\n<p><em>Note <\/em>: 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.<\/p>\n\n\n\n<h5>In conclusion<\/h5>\n\n\n\n<p>Great suggestions for further scripts can be found here:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.scriptables.de\">https:\/\/www.scriptables.de<\/a><\/p>\n\n\n\n<p>On this page you will find countless example scripts that you can use directly and use as suggestions.<\/p>\n\n\n\n<p>The following page is available for all kinds of questions:<\/p>\n\n\n\n<p><a href=\"https:\/\/talk.automators.fm\/\">https:\/\/talk.automators.fm\/<\/a><\/p>\n\n\n\n<p>Hundreds of examples can also be found here, just waiting to be tried out. You will also be happy to help with problems here.<\/p>\n\n\n\n<p>If you like my little scriptable tutorial, I would be happy about a small tip:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.paypal.com\/paypalme\/markmescher\/2,99\">https:\/\/www.paypal.com\/paypalme\/markmescher\/2,99<\/a><\/p>\n\n\n\n<p>You are of course free to decide how big the coffee should be \ud83d\ude42<\/p>\n\n\n\n<p>If you have any suggestions for this tutorial, I look forward to your comments!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another exciting thing about Scriptable is the ability to easily connect your own scripts to Siri. To stick with our Instagram example: Wouldn&#8217;t it be great if we could ask Siri how many followers we currently have? And maybe she would even answer? Hey Siri &#8211; listen to me! First of all, we can call\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.unleserlich.info\/?p=199&#038;lang=en\">Weiterlesen &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":112,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":""},"categories":[64,68],"tags":[70],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/posts\/199"}],"collection":[{"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=199"}],"version-history":[{"count":3,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/posts\/199\/revisions\/234"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unleserlich.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}