{"id":1074,"date":"2013-12-12T18:33:00","date_gmt":"2013-12-12T18:33:00","guid":{"rendered":"http:\/\/www.markosx.com\/thecocoaquest\/?p=1074"},"modified":"2013-12-12T18:34:32","modified_gmt":"2013-12-12T18:34:32","slug":"broken-skype-applescripts-fix","status":"publish","type":"post","link":"https:\/\/www.markosx.com\/thecocoaquest\/broken-skype-applescripts-fix\/","title":{"rendered":"Broken Skype Applescripts Fix&#8230;"},"content":{"rendered":"<style type=\"text\/css\"><!--\np.skype1 {margin: 0.0px 0.0px 0.0px 39.2px; text-indent: -39.3px; font: 12.0px Verdana; color: #4f8f00} p.skype2 {margin:\n    0.0px 0.0px 0.0px 57.8px; text-indent: -57.8px; font: 12.0px Verdana} p.skype3 {margin: 0.0px 0.0px 0.0px 117.8px; text-indent:\n    -117.8px; font: 12.0px Verdana; color: #0433ff} p.skype4 {margin: 0.0px 0.0px 0.0px 117.8px; text-indent: -117.8px; font:\n    12.0px Verdana} p.skype5 {margin: 0.0px 0.0px 0.0px 117.8px; text-indent: -117.8px; font: 12.0px Verdana; color: #4f8f00}\n    p.skype6 {margin: 0.0px 0.0px 0.0px 117.8px; text-indent: -117.8px; font: 12.0px Verdana; min-height: 15.0px} p.skype7 {margin:\n    0.0px 0.0px 0.0px 78.5px; text-indent: -78.6px; font: 12.0px Verdana} p.skype8 {margin: 0.0px 0.0px 0.0px 88.3px; text-indent:\n    -88.4px; font: 12.0px Verdana; min-height: 15.0px} span.skype1 {color: #000000} span.skype2 {font: 12.0px Menlo; color: #942193}\n    span.skype3 {color: #0433ff} span.skype4 {color: #5e6161} span.skype5 {color: #4f8f00} span.Apple-tab-span {white-space:pre}\n--><\/style>\n<p>Some of you may know that \u00a0<em><strong><span style=\"color: #12dfec;\">Skype<\/span><\/strong><\/em> have an API that you can access via Applescript. To do such tasks as send sms text messages.<\/p>\n<p>You may have found that for some unexplained reason this has stopped working?<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<h3 style=\"text-align: center;\">The Background<\/h3>\n<p>I have used a Applescript inside an Automator app to automatically send out sms text messages using skype and run using the Calander.app.<\/p>\n<h3 style=\"text-align: center;\">Part of the script<\/h3>\n<hr style=\"width: 85%;\" width=\"85%\" \/>\n<p>&nbsp;<\/p>\n<p><span class=\"skype1\" style=\"font-style: normal; text-indent: -39.3px;\"><b>on<\/b> <\/span><span style=\"color: #4f8f00; font-family: Verdana; font-size: 12px; font-style: normal; line-height: normal; text-indent: -39.3px;\">_skype<\/span> <span class=\"skype1\" style=\"font-style: normal; text-indent: -39.3px;\"> ( <\/span> <span style=\"color: #4f8f00; font-family: Verdana; font-size: 12px; font-style: normal; line-height: normal; text-indent: -39.3px;\">thePhone<\/span><span class=\"skype1\" style=\"font-style: normal; text-indent: -39.3px;\">, <\/span><span style=\"color: #4f8f00; font-family: Verdana; font-size: 12px; font-style: normal; line-height: normal; text-indent: -39.3px;\">the_body<\/span> <span class=\"skype1\" style=\"font-style: normal; text-indent: -39.3px;\"> , <\/span> <span style=\"color: #4f8f00; font-family: Verdana; font-size: 12px; font-style: normal; line-height: normal; text-indent: -39.3px;\">myNotice<\/span><span class=\"skype1\" style=\"font-style: normal; text-indent: -39.3px;\">, <\/span><span style=\"color: #4f8f00; font-family: Verdana; font-size: 12px; font-style: normal; line-height: normal; text-indent: -39.3px;\">myPhone<\/span> <span class=\"skype1\" style=\"font-style: normal; text-indent: -39.3px;\"> ) <\/span><\/p>\n<p class=\"skype2\"><span class=\"skype2\">\u00a0<\/span><b>tell<\/b> <span class=\"skype3\"><i>application<\/i><\/span> &#8220;Skype&#8221;<\/p>\n<p class=\"skype3\"><b>launch<\/b><\/p>\n<p class=\"skype4\"><span class=\"skype3\"><b>delay<\/b><\/span> 10<\/p>\n<p class=\"skype5\"><span class=\"skype1\"><b>set<\/b> <\/span>theSMSText<span class=\"skype1\"> <b>to<\/b> <\/span>the_body<span class=\"skype4\">&#8212; you message<\/span><\/p>\n<p class=\"skype4\"><b>set<\/b> <span class=\"skype5\">TheSMS<\/span> <b>to<\/b> ( <span class=\"skype3\"><i>word<\/i><\/span> 2 <b>of<\/b> ( <span class=\"skype3\"><b>send<\/b><\/span> <span class=\"skype3\">command<\/span> (&#8220;CREATE SMS OUTGOING &#8221; &amp; <span class=\"skype5\">thePhone<\/span> &amp; &#8220;,&#8221; &amp; <span class=\"skype5\">myPhone<\/span>) <span class=\"skype3\">script name<\/span> &#8220;Notifier&#8221;) <b>as<\/b> <span class=\"skype3\"><i>text<\/i><\/span>)<\/p>\n<p class=\"skype4\"><span class=\"skype3\"><b>send<\/b><\/span> <span class=\"skype3\">command<\/span> ((&#8220;SET SMS &#8221; &amp; <span class=\"skype5\">TheSMS<\/span> &amp; &#8221; BODY &#8221; &amp; <span class=\"skype5\">theSMSText<\/span>) <b>as<\/b> <span class=\"skype3\"><i>string<\/i><\/span>) <span class=\"skype3\">script name<\/span> &#8220;Notifier&#8221;<\/p>\n<p class=\"skype4\"><span class=\"skype3\"><b>send<\/b><\/span> <span class=\"skype3\">command<\/span> ((&#8220;ALTER SMS &#8221; &amp; <span class=\"skype5\">TheSMS<\/span> &amp; &#8221; SEND&#8221;) <b>as<\/b> <span class=\"skype3\"><i>string<\/i><\/span>) <span class=\"skype3\">script name<\/span> &#8220;Notifier&#8221;<\/p>\n<p class=\"skype6\"><span class=\"skype2\">\u00a0<\/span><\/p>\n<p class=\"skype7\"><b>end<\/b> <b>tell<\/b><\/p>\n<p class=\"skype8\"><span class=\"skype2\">\u00a0<\/span><\/p>\n<p class=\"skype1\"><span class=\"skype1\"><b>end<\/b> <\/span>_skype<\/p>\n<hr style=\"width: 85%;\" width=\"85%\" \/>\n<h3 style=\"text-align: center;\"><\/h3>\n<h3 style=\"text-align: center;\">The Problem<\/h3>\n<p>A couple of weeks ago all stopped working. The Calendar alert would fire the app would launch and fail. sms not sent. Annoying since I use these alerts to let people know it is their turn to do a task..<\/p>\n<p>What I found was the code above did no longer compile. It would get stuck on the first bit of the sky command &#8220;send\u00a0command&#8221;<\/p>\n<p>Scouring the web I could not find what was going on but figured it must be to do with a Skype update I did recently.<\/p>\n<h3 style=\"text-align: center;\">THE Solution<\/h3>\n<p>Because I realise that the problem may be to do with the update to Skype. I check the current Skype Script Terminology \u00a0in the Applescript Script\u00a0Library to see if there had been any changes to the syntax. There where none that I could see.<\/p>\n<p>But the act of opening the\u00a0Skype Terminology seemed to have re-registered the library with the system. As I found out when the code suddenly started compiling.<\/p>\n<h3 style=\"text-align: center;\">Not quite the end of the story<\/h3>\n<p>All was working again until today. I knew I had not done any updates to skype so WTF.<\/p>\n<p>It turns out that when I launched Skype it happily told me the Skype team had updated it. Again WTF.<\/p>\n<p>Opening the script library again solved the problem. But this Time I went and found the Auto update check box; That I did not know existed and unchecked it&#8230;grrr.<\/p>\n<p>So if you find that your Skype code is broken then this may be why..<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<br \/>\n<script><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some of you may know that \u00a0Skype have an API that you can access via Applescript. To do such tasks as send sms text messages. You may have found that for some unexplained reason this has stopped working? &nbsp;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[72,3,7,47,71],"class_list":["post-1074","post","type-post","status-publish","format-standard","hentry","category-blogpost","tag-api","tag-applescript","tag-automator","tag-macos-x","tag-skype"],"_links":{"self":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts\/1074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/comments?post=1074"}],"version-history":[{"count":3,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts\/1074\/revisions"}],"predecessor-version":[{"id":1078,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts\/1074\/revisions\/1078"}],"wp:attachment":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/media?parent=1074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/categories?post=1074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/tags?post=1074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}